Question

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?

Was it helpful?

Solution 2

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

OTHER TIPS

It sounds like you may have an entry in your .htaccess file along the lines of

AddHandler application/x-httpd-php54 .php

or

AddType application/x-httpd-php54 .php

When using the .htaccess to tell apache which version of PHP to use it will cause this exact problem if the declared version is either non-existent on the server or is the same version of PHP that the server is already running.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top