From:             simon dot bettison at blueyonder dot co dot uk
Operating system: Gentoo Linux 
PHP version:      5.1.0b3
PHP Bug Type:     Session related
Bug description:  $_SESSION not saving when an element's index contains pipe 
'|' character

Description:
------------
A script registers a variable in $_SESSION using and index value which
contains a pipe ("|"), 

ie 
$index = "some|index";
$_SESSION[$index]="some variable";

I expected this variable (and any other variables registered in $_SESSION)
to be stored, and made available to other script(s) executed in the same
session for the lifetime of the session cookie.

However, subseqent access to $_SESSION indicates that the $_SESSION
variable contains no data at all.

This only seems to occur following the use of the pipe ("|") character in
the element's index.


Reproduce code:
---------------
<?php

        session_start();

        print_r($_SESSION);
        $_SESSION["some|variable"]="some value";
        print_r($_SESSION);

?>


Expected result:
----------------
First execution:

Array ( ) Array ( [some|variable] => some value )

Second & Subsequent execution

Array ( [some|variable] => some value ) Array ( [some|variable] => some
value )


Actual result:
--------------
First execution:

Array ( ) Array ( [some|variable] => some value )

Second & Subsequent execution

Array ( ) Array ( [some|variable] => some value )



-- 
Edit bug report at http://bugs.php.net/?id=33786&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33786&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33786&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33786&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33786&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33786&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33786&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33786&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33786&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33786&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33786&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=33786&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=33786&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33786&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33786&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33786&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33786&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33786&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33786&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33786&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33786&r=mysqlcfg

Reply via email to