From:             hostmaster at uuism dot net
Operating system: Fedora Core 4
PHP version:      5.2CVS-2008-11-01 (snap)
PHP Bug Type:     Session related
Bug description:  Different Results than expected by 
session_decode_variation3.phpt

Description:
------------
When I run session_decode_variation3.phpt, the session_start() command
produces a different results than expected after initializing
session.serialize_handler=blah.  Instead of responding with "Warning:
session_start(): Cannot find save handler files" and still opening a
session (?), PHP responds with "Warning: session_start(): Cannot find save
handler files" and does not open a session.

I can't find any documentation as to the correct Warning with the
session.serialize_handler is not set to php or php-binary.

Thanks.

Jim




Reproduce code:
---------------
--INI--
session.serialize_handler=blah
--FILE--
<?php

ob_start();

/*
 * Prototype : string session_decode(void)
 * Description : Decodes session data from a string
 * Source code : ext/session/session.c
 */

echo "*** Testing session_decode() : variation ***\n";

var_dump(session_start());
var_dump($_SESSION);
$_SESSION["foo"] = 1234567890;
$_SESSION["bar"] = "Blah!";
$_SESSION["guff"] = 123.456;
var_dump($_SESSION);
$encoded = "A2Zvb2k6MTIzNDU2Nzg5MDs=";
var_dump(session_decode(base64_decode($encoded)));
var_dump($_SESSION);
var_dump(session_destroy());

echo "Done";
ob_end_flush();
?>


Expected result:
----------------
*** Testing session_decode() : variation ***

Warning: session_start(): Unknown session.serialize_handler. Failed to
decode session object. in %s on line %d
bool(true)
array(0) {
}
array(3) {
  ["foo"]=>
  int(1234567890)
  ["bar"]=>
  string(5) "Blah!"
  ["guff"]=>
  float(123.456)
}

Warning: session_decode(): Unknown session.serialize_handler. Failed to
decode session object. in %s on line %d
bool(true)
array(3) {
  ["foo"]=>
  int(1234567890)
  ["bar"]=>
  string(5) "Blah!"
  ["guff"]=>
  float(123.456)
}
bool(true)
Done


Actual result:
--------------
*** Testing session_decode() : variation ***

Warning: session_start(): Cannot find save handler files in
/usr/local/src/php5.2-200810312330/ext/session/tests/session_decode_variation3.php
on line 13
bool(true)

Notice: Undefined variable: _SESSION in
/usr/local/src/php5.2-200810312330/ext/session/tests/session_decode_variation3.php
on line 14
NULL
array(3) {
  ["foo"]=>
  int(1234567890)
  ["bar"]=>
  string(5) "Blah!"
  ["guff"]=>
  float(123.456)
}

Warning: session_decode(): Unknown session.serialize_handler. Failed to
decode session object. in
/usr/local/src/php5.2-200810312330/ext/session/tests/session_decode_variation3.php
on line 20
bool(true)
array(3) {
  ["foo"]=>
  int(1234567890)
  ["bar"]=>
  string(5) "Blah!"
  ["guff"]=>
  float(123.456)
}

Warning: session_destroy(): Trying to destroy uninitialized session in
/usr/local/src/php5.2-200810312330/ext/session/tests/session_decode_variation3.php
on line 22
bool(false)
Done


-- 
Edit bug report at http://bugs.php.net/?id=46453&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=46453&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=46453&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=46453&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=46453&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46453&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=46453&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=46453&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=46453&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=46453&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=46453&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=46453&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=46453&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=46453&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=46453&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=46453&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=46453&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=46453&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=46453&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=46453&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=46453&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=46453&r=mysqlcfg

Reply via email to