#21306 [Bgs->Opn]: [PATCH] warning about "cannot change the session settings"
From: Xuefer at 21cn dot com Date: Wed, 14 Sep 2005 06:32:06 +0000 Subject: #21306 [Bgs->Opn]: [PATCH] warning about "cannot change the session settings" References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-85012@lists.php.net to get a copy of this message
ID: 21306
User updated by: Xuefer at 21cn dot com
Reported By: Xuefer at 21cn dot com
-Status: Bogus
+Status: Open
Bug Type: Session related
Operating System: linux
-PHP Version: 4.3.12-dev
+PHP Version: PHP 4.4.1 cvs (cgi-fcgi) (cvs up/built: Sep 14 2005
14:13:54)
Assigned To: sas
New Comment:
i have verified it in lastest cvs in 4.4 branch.
./sapi/cgi/php -c /home/xuefer/etc/php.ini test.php
Content-type: text/html
X-Powered-By: PHP/4.4.1-dev
Set-Cookie: PHPSESSID=b50128d8959939728d21dd36eaf15b7c; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
<br />
<b>Warning</b>: Unknown(): A session is active. You cannot change the
session module's ini settings at this time. in <b>Unknown</b> on line
<b>0</b><br />
php.ini:
include_path=".:/usr/local/lib/php"
display_errors=On
error_reporting=E_ALL
log_errors = On
error_log = /tmp/phperr
memory_limit = 50M
(no other options)
reproduce script:
<?php
function dummy() {
return '';
}
function test() {
exit;
}
$open = $close = $read = $destroy = $gc = 'dummy';
$write = 'test';
session_set_save_handler($open, $close, $read, $write, $destroy, $gc);
session_start();
?>
Previous Comments:
------------------------------------------------------------------------
[2005-09-02 08:44:21] sniper@php.net
Can not reproduce, there's been couple of reports and none them with
proper way to get this reproduced. Most likely user error.
------------------------------------------------------------------------
[2005-02-12 09:23:34] Xuefer at 21cn dot com
confirmed with CVS
again, exit() in sess_write() cause this issue
other modules after session module is not shutdown properly
i don't see any fix in the php4-src/ext/session/ source
------------------------------------------------------------------------
[2005-01-25 15:28:30] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2004-11-08 17:24:27] Xuefer at 21cn dot com
i guess i've found the bug
it's a "exception safe" problem as c++
well, not php5 exception, i meant zend_bailout(longjmp)
when write handler issue a Fatal error, will trigger zend_bailout() and
skip ALL other modules rshutdown, including the one right after
session_flush_data();
session.c:
static void php_session_flush(TSRMLS_D)
{
if(PS(session_status)==php_session_active) {
php_session_save_current_state(TSRMLS_C); <-- NOT exception
safe using for mod_user.c
}
PS(session_status)=php_session_none; <- WON'T executed when
zend_bailout
}
suggested fix:
mod_user.c :: function PS_WRITE_FUNC(user)
chnage
======
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
======
to
======
zend_try {
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
} zend_end_try();
======
------------------------------------------------------------------------
[2003-05-20 10:03:32] sas@php.net
Code being executed twice really sounds like a problem in the scripting
engine to me. It could be caused or triggered by defects in the tool
chain (buggy compiler optimizer, broken bison/flex).
Please retest with current Stable snapshot from snaps.php.net.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21306
--
Edit this bug report at http://bugs.php.net/?id=21306&edit=1
Thread (43 messages)
- #21306 [Opn->Fbk]: warnning about "cannot change the session settings"
- #21306 [Fbk->Opn]: warnning about "cannot change the session settings"
- #21306 [Opn]: warnning about "cannot change the session settings"
- #21306 [Com]: warnning about "cannot change the session settings"
- #21306 [Com]: warnning about "cannot change the session settings"
- #21306 [Com]: warnning about "cannot change the session settings"
- #21306 [Com]: warnning about "cannot change the session settings"
- #21306 [Com]: warnning about "cannot change the session settings"
- #21306 [Opn->Fbk]: warnning about "cannot change the session settings"
- #21306 [Com]: warnning about "cannot change the session settings"
- #21306 [Com]: warnning about "cannot change the session settings"
- #21306 [Fbk->NoF]: warnning about "cannot change the session settings"
- #21306 [Com]: warnning about "cannot change the session settings"
- #21306 [Com]: warnning about "cannot change the session settings"
- #21306 [NoF]: warnning about "cannot change the session settings"
- #21306 [Com]: warnning about "cannot change the session settings"
- #21306 [NoF->Opn]: warnning about "cannot change the session settings"
- #21306 [Opn->Bgs]: warnning about "cannot change the session settings"
- #21306 [Bgs->Opn]: warnning about "cannot change the session settings"
- #21306 [Opn->Asn]: [PATCH] warning about "cannot change the session settings"
- #21306 [Asn->Fbk]: [PATCH] warning about "cannot change the session settings"
- #21306 [Fbk->NoF]: [PATCH] warning about "cannot change the session settings"
- #21306 [NoF->Opn]: [PATCH] warning about "cannot change the session settings"
- #21306 [Opn]: [PATCH] warning about "cannot change the session settings"
- #21306 [Opn->Bgs]: [PATCH] warning about "cannot change the session settings"
- #21306 [Bgs->Opn]: [PATCH] warning about "cannot change the session settings"
- #21306 [Opn->Fbk]: [PATCH] warning about "cannot change the session settings"
- #21306 [Opn->Fbk]: [PATCH] warning about "cannot change the session settings"
- #21306 [Fbk->Opn]: [PATCH] warning about "cannot change the session settings"
- #21306 [Fbk->Opn]: partly RSHUTDOWN and "cannot change the session settings" error
- #21306 [Opn->Fbk]: partly RSHUTDOWN and "cannot change the session settings" error
- #21306 [Fbk->Opn]: partly RSHUTDOWN and "cannot change the session settings" error
- #21306 [Opn->Fbk]: partly RSHUTDOWN and "cannot change the session settings" error
- #21306 [Fbk]: partly RSHUTDOWN and "cannot change the session settings" error
- #21306 [Fbk->Opn]: partly RSHUTDOWN and "cannot change the session settings" error
- #21306 [Opn]: partly RSHUTDOWN and "cannot change the session settings" error
- #21306 [Opn->Csd]: partly RSHUTDOWN and "cannot change the session settings" error
- #21306 [Csd->Opn]: partly RSHUTDOWN and "cannot change the session settings" error
- #21306 [Opn->Fbk]: partly RSHUTDOWN and "cannot change the session settings" error
- #21306 [Fbk]: partly RSHUTDOWN and "cannot change the session settings" error
- #21306 [Fbk->Csd]: partly RSHUTDOWN and "cannot change the session settings" error
- #21306 [Csd]: partly RSHUTDOWN and "cannot change the session settings" error
| « previous | php.bugs (#85012) | next » |
|---|