From:             nospam0 at malkusch dot de
Operating system: Linux
PHP version:      Irrelevant
PHP Bug Type:     Documentation problem
Bug description:  register_globals is expected to globalize $_SESSION?

Description:
------------
There's a discrepance in the manual:   
   
,--<http://de.php.net/manual/en/ini.core.php#ini.register-globals>--   
| Whether or not to register the EGPCS (Environment, GET,   
| POST, Cookie, Server) variables as global variables.   
`--   
   
,--<http://de.php.net/manual/en/reserved.variables.php>--   
| If the register_globals directive is set, then these    
| variables will also be made available in the global    
| scope of the script; i.e., separate from the $_SESSION    
| and $HTTP_SESSION_VARS arrays.   
`--   
   
It's also interessting how PHP 5.0.5 acts concering this  
issue. When creating a new Session it behaves as it's  
described in  
<http://de.php.net/manual/en/ini.core.php#ini.register-globals>,  
and the content of $_SESSION is inknown in $GLOBALS. But  
when I continue the session there's also the content of  
$_SESSION in $GLOBALS.  

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

var_dump(ini_get('register_globals'));
var_dump($test);
var_dump($_SESSION['test']);

Actual result:
--------------
,--<new session> 
| string(1) "1" 
| NULL 
| string(4) "test" 
`-- 
 
,--<continued session> 
| string(1) "1" 
| string(4) "test" 
| string(4) "test" 
`-- 

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

Reply via email to