The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

apache 2 + php4&5 - php5 files not being parsed

Discussion in 'EasyApache' started by DBJoshua, Oct 17, 2007.

  1. DBJoshua

    DBJoshua Active Member

    Jun 7, 2007
    Likes Received:
    Trophy Points:
    Hey guys,

    I've just used easyapache, and built php4 and 5 within cPanel. I set PHP4 to be parsed by SuPHP and PHP5 by FCGI. However, all .php5 files are now being download/uploaded, rather than parsed.

    How would I go about getting it fixed?

    Previously I would have "AddHandler application/x-httpd-php5 .php" in .htaccess to parse .php5 files as .php. Now that doens't work.

    Any ideas?

    Thank you!
  2. jdlightsey

    jdlightsey Perl Developer III
    Staff Member

    Mar 6, 2007
    Likes Received:
    Trophy Points:
    Houston Texas
    cPanel Access Level:
    Root Administrator
    The MIME type used by mod_fcgid is fcgid-script, not application/x-httpd-php

    I think you'd need to duplicate the FCGIWrapper line that's already in php.conf and add one with the .php extensions so that mod_fcgid can map the extension properly, then you'd want to use fcgid-script as the MIME type in the AddHandler line.

    Why do you want to use mod_fcgid though? Mod_suphp can handle both versions of PHP, it's more flexible to configure, and doesn't require lots of tweaking to get it performing well.

Share This Page