#19068 [Opn]: $_SESSION behaves like session_register(), but doesn't call session_start()
| From: | mfischer@php.net | Date: | Fri, 23 Aug 2002 12:12:00 +0000 |
| Subject: | #19068 [Opn]: $_SESSION behaves like session_register(), but doesn't call session_start() | ||
| References: | 1 | Groups: | php.bugs php.doc |
| Request: | Send a blank email to php-bugs+get-17641@lists.php.net to get a copy of this message | ||
ID: 19068
Updated by: mfischer@php.net
Reported By: mfischer@php.net
Status: Open
-Bug Type: Session related
+Bug Type: Documentation problem
Operating System: Any
PHP Version: 4CVS-2002-08-23
New Comment:
Damn, doc problem of course.
Previous Comments:
------------------------------------------------------------------------
[2002-08-23 08:10:38] mfischer@php.net
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 this bug report at http://bugs.php.net/?id=19068&edit=1