php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15867 Session variable disappears under Windows 2000
Submitted: 2002-03-05 00:16 UTC Modified: 2002-03-05 18:33 UTC
From: Lee dot Seldon at infotech dot monash dot edu dot au Assigned:
Status: Closed Package: Session related
PHP Version: 4.1.0 OS: Windows 2000 Professional
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Lee dot Seldon at infotech dot monash dot edu dot au
New email:
PHP Version: OS:

 

 [2002-03-05 00:16 UTC] Lee dot Seldon at infotech dot monash dot edu dot au
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-05 18:33 UTC] yohgaki@php.net
This bug has been fixed in CVS.

It's probably fixed in CVS. Please reopen if there is the problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 18:01:36 2024 UTC