note 38298 rejected from function.session-id by vincent
| From: | vincent@php.net | Date: | Tue, 16 Dec 2003 08:52:05 +0000 |
| Subject: | note 38298 rejected from function.session-id by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62022@lists.php.net to get a copy of this message | ||
Note Submitter: bisailb@myprivacy.ca
----
I had the following in my AuthHelper class and it didn't work right. When I logged in, it
didn't create a session file in /tmp or a session cookie in my brower. However, I could read
the session data from the current page but not any other page after that.
<?php
if(!session_id()){
session_start();
}
?>
Therefore, I used this instead and it worked right...
<?php
if (!isset($_SESSION)) {
session_start();
}
?>
By the way, this happened to me with PHP 5.0.0 Beta 2 so maybe it's a bug? Not sure...