php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45406 [PATCH] session.serialize_handler declared by shared extension fails
Submitted: 2008-07-01 16:29 UTC Modified: 2008-08-06 21:34 UTC
Votes:6
Avg. Score:4.3 ± 1.1
Reproduced:5 of 6 (83.3%)
Same Version:5 (100.0%)
Same OS:5 (100.0%)
From: oleg dot grenrus at dynamoid dot com Assigned:
Status: Closed Package: Session related
PHP Version: 5.2.6 OS: *
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: oleg dot grenrus at dynamoid dot com
New email:
PHP Version: OS:

 

 [2008-07-01 16:29 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-04 06:22 UTC] 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-08-06 21:34 UTC] kalle@php.net
Backported to 5.2.7
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 15:01:30 2024 UTC