New session created by each session_start (), cannot reuse a session

From: Date: Thu, 24 Apr 2003 01:05:59 +0000
Subject: New session created by each session_start (), cannot reuse a session
Groups: php.windows 
Request: Send a blank email to php-windows+get-19587@lists.php.net to get a copy of this message
Windows XP, PHP 4.2.3, Apache 1.3.27 register_globals is on, Session.save_path seems to be set right because session save files are generated. The problem is a new session is created each time I refresh the page. I am not sure of the use of session.cookie_path. I have it set to c:\ in php.ini. Here is the code: <?php session_start(); session_register("SESSION"); if (!isset($HTTP_SESSION_VARS["SESSION"])) { $SESSION["count"] = 0; echo "Counter initialized, please reload this page to see it increment"; } else { echo "Waking up session $PHPSESSID"; $SESSION["count"]++; } echo "The counter is now $SESSION[count] "; ?> Can someone point me to what might be wrong. When I run this on a web host with the same versions of PHP and Apache on Linux, it works as expected. I don't have visibility into the php.ini file on the web host, but the phpinfo() data looks the same where appropriate. Thanks for any help Dan

« previous php.windows (#19587) next »