#19068 [NEW]: $_SESSION behaves like session_register(), but doesn't call session_start()

From: Date: Fri, 23 Aug 2002 12:10:38 +0000
Subject: #19068 [NEW]: $_SESSION behaves like session_register(), but doesn't call session_start()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-17640@lists.php.net to get a copy of this message
From: mfischer@php.net Operating system: Any PHP version: 4CVS-2002-08-23 PHP Bug Type: Session related Bug description: $_SESSION behaves like session_register(), but doesn't call session_start() The manual page about session_register (http://www.php.net/manual/en/function.session-register.php) says: "Caution: If you are using $_SESSION (or $HTTP_SESSION_VARS), do not use session_register(), session_is_registered() and session_unregister()." and a few lines later "If session_start() was not called before this function is called, an implicit call to session_start() with no parameters will be made." But the latter is not true if only $_SESSION is used to register a session variable. The current implementation requires a manual call to session_start(). This should be noted there. Idially, it should be mentioned also at http://www.php.net/manual/en/ref.session.php (where it says: Note: As of PHP 4.1.0, $_SESSION is available as global variable just like ...) and maybe also at http://www.php.net/manual/en//language.variables.predefined.php (which may be too much good will though ;) -- Edit bug report at http://bugs.php.net/?id=19068&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19068&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19068&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19068&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19068&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19068&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19068&r=support Expected behavior: http://bugs.php.net/fix.php?id=19068&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19068&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19068&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19068&r=globals

« previous php.bugs (#17640) next »