1
votes

I created my custom PHP session handler and sometimes I get the PHP warning:

PHP Warning:  curl_exec(): A session is active. You cannot change the session module's ini settings at this time in

This appear to be a randomic issue, and "curl_exe()" function is not the problem, since the function always changes when the error occures.

The custom session handler saves sessions into memcache and OrientDB, I am sure memcache and orientdb don't have problems when the error occures because I have no errors retrieving/saving data on them before and after the warning.

I'm using Debian 6.0.6 stable, with 2.2.16-6+squeeze10 (prefork) and libapache2-mod-php5 5.3.3-7+squeeze14. I think it's a PHP bug, but I'm not finding it into the php or debian bug database. Any glue? Thanks.

P.S. If you need the session handler PHP code, I can publish it open source!

1
I think I've found the problem. I'm using apache prefork with a module multi threaded (mod_spdy by google). There should be something wrong with it. Once commented out and restarted apache, the PHP error has gone completely away...dAm2K

1 Answers

0
votes

I've found the source of the problem. If you are using apache prefork with PHP but you are using one apache module that make use of threads (in my case mod_spdy by google) you may have problems with PHP.

Commenting out mod_spdy (or in your case any other module using threads) in httpd.conf seems to completely solve the problem.