Search code examples
phpsessionfastcgi

PHP5 subdomains not working after domain wide switch to PHP5 FastCGI


Until last week I had a working configuration of my managed server that was set up to run under PHP4 while all the subdomains ran PHP5 (everything else was a typical LAMP configuration). So it looked like this:

PHP4 (globally set):

  • www.myDomain.com

PHP5 (via .htaccess and php.ini):

  • symfony.myDomain.com
  • magento.myDomain.com
  • reviveAdserver.myDomain.com

Now I finally updated the global configuration to PHP5.3 FastCGI and all the subdomains stopped working. I disabled the .htaccess and php.ini settings too - to no success :-(

The behaviour is as follows:

  1. Calling the first page in a session will work
  2. Every subsequent call will return a "500 Internal Server Error" until I clean all cookies and start with step 1 again.

As far as I can tell no error logs are written. The concerned projects are all major well known applications (including a Magento installation which - luckily - is still in development). I tried a new install of the Revive AdServer which should support FastCGI - but it shows the same behaviour again.

I am absulutely at the end of my knowledge and so hoping you guys have an idea what it could be.


Solution

  • After trying EVERY(!!!) possible variation of my default php.ini settings in a sandbox I found the following setting to be the reason:

    session.auto_start = On
    

    This seems to be an incompatible setting for at least Magento 1.8 as well as for the Revive Adverver. Both stopped showing the erroneous behaviour as soon as I changed that. As for symfony I can not yet tell, but I guess it won't matter much as symfony doesn't come as a "ready-to-use" anyway.

    Just as foot note and for people who run into the same kind of behaviour: Revive Adverver generated the following error.log:

    PHP Fatal error: OX_Admin_UI_Install_InstallController::initInstallStatus() [ox-admin-ui-install-installcontroller.initinstallstatus]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "OX_Admin_UI_Install_InstallStatus" of the object you are trying to operate on was loaded before unserialize() gets called or provide a __autoload() function to load the class definition in /lib/OX/Admin/UI/Install/InstallController.php on line 134