Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Aug 2006
    Posts
    196
    cPanel/Enkompass Access Level

    Root Administrator

    Default MIMETypes/AddHandler Apache2, suPHP and PHP5

    Parsing PHP in .html Files with Apache2/suPHP PHP5? The old method does not work

    Adding AddHandler in .htaccess file is not working.

    Have tried each one of these without any success:

    AddType application/x-httpd-php .php .htm .html

    AddType x-httpd-php .php .htm .html

    AddType application/x-httpd-php5 .php .htm .html

    AddType x-httpd-php5 .php .htm .html

    AddHandler application/x-httpd-php5 .php .htm .html

    AddHandler x-httpd-php5 .php .htm .html

    AddHandler application/x-httpd-php .php .htm .html

    AddHandler x-httpd-php .php .htm .html
    None of these work. HTML files with PHP are being prompt to download from the server instead of being parsed in firefox.
    Last edited by WireNine; 10-11-2007 at 05:32 PM.

  2. #2
    Member LiNUxG0d's Avatar
    Join Date
    Jun 2003
    Location
    Gatineau, Quebec, Canada
    Posts
    206

    Default

    Same problem!

    Any ideas?
    http://www.okteck.com/
    The best web hosting, reseller hosting and dedicated server packages!

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jan 2006
    Posts
    654

    Default

    Did you find a resolution to this ?

  4. #4
    Registered User
    Join Date
    Apr 2005
    Posts
    4

    Default

    Has there been a resolution with this thread? I have the same problem and I am still looking for a solution.

    Thanks

  5. #5
    nat
    nat is offline
    Member
    Join Date
    Jan 2003
    Posts
    210

    Default

    I'm having the same problem on my servers.

    I cannot use the following in a .htaccess file to get php to work with .html extensions.

    AddHandler application/x-httpd-php .html


    I'm running apache v1.x with phpsuexec. PHP version 5.2.5

    It started when I used the new easyapache to compile PHP.

    I also noticed httpd.conf no longer has all of the php stuff like...

    AddHandler application/x-httpd-php .php .php4 .php3
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php4
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php-source .phps
    AddType application/x-httpd-php .phtml

    I added it and it then php wouldn't work at all so I took it back out.
    Last edited by nat; 01-02-2008 at 03:13 PM.

  6. #6
    nat
    nat is offline
    Member
    Join Date
    Jan 2003
    Posts
    210

    Default

    Using these will now cause a download prompt when accessing a php script. If you have any of these in httpd.conf take it out.

    AddHandler application/x-httpd-php .php .php4 .php3
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php4
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php-source .phps
    AddType application/x-httpd-php .phtml


    /usr/local/apache/conf/php.conf is used now.


    I used what /usr/local/apache/conf/php.conf uses in a .htaccess file and it worked.

    AddHandler application/x-httpd-php5 .html .htm .php

  7. #7
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jan 2006
    Posts
    654

    Default

    Yep

    AddHandler application/x-httpd-php5

    is what you need. I've seen it in another thread also

Similar Threads & Tags
Similar threads

  1. Configure PHP and SuExec PHP5/4 addhandler issue
    By devGOD in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-10-2011, 02:47 PM
  2. I need help about upgrading to apache2/php5
    By xserverx in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 01-19-2008, 05:00 AM
  3. Does it work with apache2, php5, mysql 5?
    By Nikoms in forum New User Questions
    Replies: 2
    Last Post: 12-05-2006, 01:25 PM
  4. Apache2+php4+php5......Help!!!
    By ipglobe in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-16-2006, 03:26 PM
  5. Apache2 + php5 + MySQL4.1
    By aaroncampbell in forum New User Questions
    Replies: 2
    Last Post: 03-22-2005, 05:42 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube