Bug #15867: Session variable disappears under Windows 2000

From: Date: Tue, 05 Mar 2002 05:17:01 +0000
Subject: Bug #15867: Session variable disappears under Windows 2000
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-1653@lists.php.net to get a copy of this message
From: Lee.Seldon@infotech.monash.edu.au Operating system: Windows 2000 Professional PHP version: 4.1.0 PHP Bug Type: Session related Bug description: Session variable disappears under Windows 2000 I have 2 scripts: providerlogin.php sets session variable $userSN displayprovider.php tests $userSN and displays info depending on result Both scripts work as expected under Win98, Apache 1.13.22, php 4.1.0 WinNT, Apache 1.13.22, php 4.1.0 WinNT, IIS, php 4.1.0 but under Windows 2000 Professional, Apache 1.13.22, php 4.1.0 $userSN has disappeared when I run displayprovider.php or even if I return to providerlogin.php. providerlogin.php ... session_start(); // starting session // session variables must be global global $userSN; // registering session variables session_register("userSN"); // test if user is loged-in ?> <html> <head> ............ $result = odbc_exec($conn, $query); if(odbc_fetch_row($result, 1)) { $realUserSN = odbc_result($result, 1); $providerName = odbc_result($result, 2); $userName = odbc_result($result, 3); $realPassword = odbc_result($result, 4); $refereeStat = odbc_result($result, 5); $userSN = $realUserSN; odbc_free_result($result); odbc_close($conn); if (isset($userSN)) { printf("<FONT size=5><b>Welcome to Provider Login</b></FONT><br>"); printf("<FONT size=3>%s</FONT><br>\n", $providerName); printf("<b><i>You are logged on from :</i></b> %s <br><br>\n", $REMOTE_ADDR); } else printf("<FONT size=5><b>ERROR setting session cookie</b></FONT><br>"); printf("</body></html>"); exit; } else { //didn't find the given password $notFound = true; } displayprovider.php ........ // If user is logged in, may send messages to this provider if (isset($userSN)) { // User may update provider if OnLine and myCookie corresponds to the displayed provider or is admin login 555fff if (($OnLine == true) && ($userSN == $providersn)) { printf("<h3><A HREF=\"../update/update.php?providerSN=%s\">Update Details</h3></A><br>\n", $providersn); } } //End of myCookie is set, thus user is logged in else { // if myCookie is not set, print message about logging in echo "<H3>- To send messages to this provider, you must have logged in.</H3><BR>"; } [Session] session.save_handler=files session.save_path=C:\Program Files\PHP\sessiondata ; argument passed to save_handler session.use_cookies=1 session.name=PHPSESSID session.auto_start=0 session.cookie_lifetime=0 session.cookie_path=/ session.cookie_domain= session.serialize_handler=php session.gc_probability=1 session.gc_maxlifetime=1440 session.referer_check= session.entropy_length=0 session.entropy_file= ;session.entropy_length=16 ;session.entropy_file=/dev/urandom session.cache_limiter=nocache session.cache_expire=180 session.use_trans_sid=1 url_rewriter.tags="a=href,area=href,frame=src,input=src,form=fakeentry" The closest I can find in the bug database is 14636. Lee -- Edit bug report at http://bugs.php.net/?id=15867&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=15867&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=15867&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=15867&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=15867&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=15867&r=support Expected behavior: http://bugs.php.net/fix.php?id=15867&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=15867&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=15867&r=submittedtwice

« previous php.bugs (#1653) next »