Search code examples
phpapachedebianmod-fcgid

Apache downloads the php file after updating php version from 5.3.28 to 5.4.25


I am running php on Debian 6 with mod_fcgid with DotDeb packages.

Once I upgraded php to version 5.4.25, apache downloads the php files as it does not recognize the handlers. I am not updating any config files. Once I revert back to 5.3.28 it works ok. I am not able to track anything in the error logs.

The only difference is that dotdeb don't have a php build with suhosin for 5.4, but should not make a difference because the 5.3 version works even with suhosin disabled.

Any ideas how to debug this?


Solution

  • It turns out that with the new version Apache needs different configuration:

    In the site configuration in /etc/apache2/sites-available/{mysite}.conf I added:

    <FilesMatch \.php$>
        SetHandler fcgid-script
    </FilesMatch>
    

    And commented out this:

    #AddHandler fcgid-script .php
    #AddHandler fcgid-script .php5
    

    The same thing in /etc/apache2/mods-available/fcgid.conf