#45406 [Csd]: [PATCH] session.serialize_handler declared by shared extension fails
| From: | kalle@php.net | Date: | Wed, 06 Aug 2008 21:34:09 +0000 |
| Subject: | #45406 [Csd]: [PATCH] session.serialize_handler declared by shared extension fails | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-127695@lists.php.net to get a copy of this message | ||
ID: 45406
Updated by: kalle@php.net
Reported By: oleg dot grenrus at dynamoid dot com
Status: Closed
Bug Type: Session related
Operating System: *
PHP Version: 5.2.6
New Comment:
Backported to 5.2.7
Previous Comments:
------------------------------------------------------------------------
[2008-08-04 06:22:05] kalle@php.net
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2008-07-01 16:29:05] oleg dot grenrus at dynamoid dot com
Description:
------------
PHP warnings are issued as
PHP Warning: session_start(): Unknown session.serialize_handler.
Failed todecode session object. in - on line 2
PHP Warning: Unknown: Unknown session.serialize_handler. Failed to
encode session object. in Unknown on line 0
These happen because session module try's to find serialize_handler
before
serializer module is loaded (and registered itself as valid
serialize_handler)
There are check for save_handler (PS(mod) != NULL) in the
PHP_RINIT_FUNCTION(session), but not for PS(serializer)
I wrote a short patch
http://phadej.daug.net/php-5.2.6-serialize_handler.patch
against php-5.2.6. PHP_RINIT_FUNCTION seems to be same in php-5.2 and
php-5.3
brances.
Reproduce code:
---------------
php -d "extension=wddx.so" -d 'session.serialize_handler=wddx' <<\EOF
<?php
var_dump(session_start());
?>
EOF
Expected result:
----------------
bool(true)
Actual result:
--------------
PHP Warning: session_start(): Unknown session.serialize_handler.
Failed to decode session object. in /home/phadej/dev/php-sess-bug/- on
line 2
bool(true)
PHP Warning: Unknown: Unknown session.serialize_handler. Failed to
encode session object. in Unknown on line 0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45406&edit=1