|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-03-05 18:33 UTC] yohgaki@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 19:00:01 2025 UTC |
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