PHP警告:会话处于活动状态.您目前无法在/../中更改会话模块的ini设置. [英] PHP Warning: A session is active. You cannot change the session module's ini settings at this time in /../

查看:410
本文介绍了PHP警告:会话处于活动状态.您目前无法在/../中更改会话模块的ini设置.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了自定义PHP会话处理程序,有时会收到PHP警告:

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

这似乎是一个随机问题,而"curl_exe()"函数不是问题,因为该函数总是在发生错误时发生变化.

自定义会话处理程序将会话保存到memcache和OrientDB中,我确信错误发生时memcache和orientdb不会出现问题,因为在警告前后,我在它们上检索/保存数据都没有错误.

我正在使用带有2.2.16-6 + squeeze10(prefork)和libapache2-mod-php5 5.3.3-7 + squeeze14的Debian 6.0.6稳定版.我认为这是一个PHP错误,但是我没有在php或debian错误数据库中找到它.有胶水吗?谢谢.

P.S.如果您需要会话处理程序PHP代码,我可以将其发布为开源代码!

解决方案

我找到了问题的根源. 如果您将apache prefork与PHP一起使用,但您正在使用一个利用线程的apache模块(在我的情况下为Google的mod_spdy),则PHP可能会出现问题.

在httpd.conf中注释掉mod_spdy(或者在您的情况下,其他使用线程的模块)似乎可以完全解决问题.

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!

解决方案

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.

这篇关于PHP警告:会话处于活动状态.您目前无法在/../中更改会话模块的ini设置.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆