#45406 [Opn->Csd]: [PATCH] session.serialize_handler declared by shared extension fails

From: Date: Mon, 04 Aug 2008 06:22:05 +0000
Subject: #45406 [Opn->Csd]: [PATCH] session.serialize_handler declared by shared extension fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-127562@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:           Open
+Status:           Closed
 Bug Type:         Session related
 Operating System: *
 PHP Version:      5.2.6
 New Comment:

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.




Previous Comments:
------------------------------------------------------------------------

[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



Thread (3 messages)

« previous php.bugs (#127562) next »