Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

MIMETypes/AddHandler Apache2, suPHP and PHP5

Discussion in 'EasyApache' started by WireNine, Oct 11, 2007.

  1. WireNine

    WireNine Well-Known Member

    Joined:
    Aug 14, 2006
    Messages:
    197
    Likes Received:
    0
    Trophy Points:
    166
    cPanel Access Level:
    Root Administrator
    Parsing PHP in .html Files with Apache2/suPHP PHP5? The old method does not work :confused:

    Adding AddHandler in .htaccess file is not working.

    Have tried each one of these without any success:

    None of these work. HTML files with PHP are being prompt to download from the server instead of being parsed in firefox.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 WireNine, Oct 11, 2007
    Last edited: Oct 11, 2007
  2. LiNUxG0d

    LiNUxG0d Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    206
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Gatineau, Quebec, Canada
    Same problem!

    Any ideas?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    841
    Likes Received:
    14
    Trophy Points:
    168
    Did you find a resolution to this ?
     
  4. LGRCompEnt

    LGRCompEnt Registered

    Joined:
    Apr 11, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    Has there been a resolution with this thread? I have the same problem and I am still looking for a solution.

    Thanks
     
  5. nat

    nat Well-Known Member

    Joined:
    Jan 16, 2003
    Messages:
    210
    Likes Received:
    0
    Trophy Points:
    166
    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.
     
    #5 nat, Jan 2, 2008
    Last edited: Jan 2, 2008
  6. nat

    nat Well-Known Member

    Joined:
    Jan 16, 2003
    Messages:
    210
    Likes Received:
    0
    Trophy Points:
    166
    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. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    841
    Likes Received:
    14
    Trophy Points:
    168
    Yep

    AddHandler application/x-httpd-php5

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

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice