ID: 21306
Updated by: [EMAIL PROTECTED]
Reported By: Xuefer at 21cn dot com
-Status: Open
+Status: Feedback
Bug Type: Session related
Operating System: linux
-PHP Version: PHP 4.4.1 cvs (cgi-fcgi) (cvs up/built: Sep 14 2005
14:13:54)
+PHP Version: 4CVS (2005-09-14)
Assigned To: sas
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
And provide a script that actually is usable. For that script it's
perfectly fine to give an error..
Also: The version string in the 'Version' field in the bug reports MUST
start with a number 4,5 or 6.
Previous Comments:
------------------------------------------------------------------------
[2005-09-14 08:32:02] Xuefer at 21cn dot com
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();
?>
------------------------------------------------------------------------
[2005-09-02 08:44:21] [EMAIL PROTECTED]
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] [EMAIL PROTECTED]
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();
======
------------------------------------------------------------------------
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