#21306 [Fbk->Csd]: partly RSHUTDOWN and "cannot change the session settings" error
From: sniper@php.net Date: Fri, 23 Sep 2005 08:17:04 +0000 Subject: #21306 [Fbk->Csd]: partly RSHUTDOWN and "cannot change the session settings" error References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-85478@lists.php.net to get a copy of this message
ID: 21306
Updated by: sniper@php.net
Reported By: Xuefer at 21cn dot com
-Status: Feedback
+Status: Closed
Bug Type: Session related
Operating System: linux
PHP Version: 5CVS, 4CVS, 6CVS (2005-09-16)
Assigned To: sas
New Comment:
Patch committed.
Previous Comments:
------------------------------------------------------------------------
[2005-09-21 10:29:19] sniper@php.net
Does THIS fix it:
http://www.php.net/~jani/patches/bug21306.patch
???
------------------------------------------------------------------------
[2005-09-21 04:25:24] Xuefer at 21cn dot com
yeah, all modules is rshutdown correctly. but sorry.. the session error
messages is still there, let's check the source
PHP_RSHUTDOWN_FUNCTION(session)
{
zend_try {
php_session_flush(TSRMLS_C); <- bailout, function is partly
executed, do we care? let's step inside
php_rshutdown_session_globals(TSRMLS_C); <- not executed
} zend_end_try();
...
}
static void php_session_flush(TSRMLS_D)
{
if(PS(session_status)==php_session_active) {
php_session_save_current_state(TSRMLS_C); <- bailout, function
is partly executed, but we don't care
PS(session_status)=php_session_none; <- not executed. oops!
this is important for SESSION_CHECK_ACTIVE_STATE
}
}
i realize that, my patch to zend_API.c make sure every modules's
rshutdown handler is called, but can't make sure the rshutdown itself
is completed.
------------------------------------------------------------------------
[2005-09-20 23:04:57] sniper@php.net
Fixed in PHP_4_4, PHP_5_1 and HEAD branches with this patch:
diff -u -r1.417 session.c
--- session.c 3 Aug 2005 14:07:44 -0000 1.417
+++ session.c 20 Sep 2005 20:54:26 -0000
@@ -1807,8 +1807,11 @@
PHP_RSHUTDOWN_FUNCTION(session)
{
- php_session_flush(TSRMLS_C);
- php_rshutdown_session_globals(TSRMLS_C);
+ zend_try {
+ php_session_flush(TSRMLS_C);
+ php_rshutdown_session_globals(TSRMLS_C);
+ } zend_end_try();
+
return SUCCESS;
}
/* }}} */
Let me know if this doesn't fix the issue. (hard for me to confirm
since I can't even reproduce it :)
------------------------------------------------------------------------
[2005-09-20 16:11:44] Xuefer at 21cn dot com
about ps_call_handler:
hrm.. no idea if any other module/session handler have to be "no
bailout" and/or "might bailout". i can only bring the problem up.
------------------------------------------------------------------------
[2005-09-20 16:04:54] Xuefer at 21cn dot com
the patch i proposed long ago ([8 Nov 2004 5:24pm CET], the 2nd note in
this bug) patches mod_user.c only
do u mean here?
zend_try {
zend_hash_apply(&module_registry, (apply_func_t)
module_registry_cleanup TSRMLS_CC);
} zend_end_try();
this try/catch here will only make sure zend_deactivate_modules is
return correctly, any single bailout will break the loop of
zend_hash_apply(), which is foreach item in module_registry, all
remaining modules is not RSHUTDOWNed correctly
either one of the patches will do. u don't need apply both of them.
let module itself, or php engine to make sure not to bailout in the
middle. it's up to u guys to decide :)
------------------------------------------------------------------------
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 (#85478) | next » |
|---|