note 38298 added to function.session-id

From: Date: Tue, 16 Dec 2003 02:56:54 +0000
Subject: note 38298 added to function.session-id
Groups: php.notes 
Request: Send a blank email to php-notes+get-62014@lists.php.net to get a copy of this message
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... ---- Manual Page -- http://www.php.net/manual/en/function.session-id.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38298 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38298&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38298&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#62014) next »