From:             phpbugreport at growyouthful dot com
Operating system: Apache 20051115
PHP version:      5.2.9RC1
PHP Bug Type:     Session related
Bug description:  php variables and session variables may not have the same name

Description:
------------
I wanted to carry the value of $newsletter from page to page. When I saved
it as
$_SESSION['newsletter']= $newsletter; 
and then got the value of the session variable later, it was not what was
saved previously. It seemed to be empty or null. 

This bug may also have caused the page to hang, and numerous invocations
of the script - my web stats showed that the script had been run several
thousand times by me. However, an ob_flush() seemed to fix this problem of
hanging.

When I changed the session variable name to xnewsletter, it fixed the
problem.

Note: my php host is using php 5.2.6 and I do not have the option of
asking them to change that




Reproduce code:
---------------
session_start();
$_SESSION['newsletter']= $newsletter;

...later...

session_start();
$newsletter=$_SESSION['newsletter'];

Expected result:
----------------
see Description


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

Reply via email to