php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12704 Session variables DO NOT WORK!
Submitted: 2001-08-12 01:36 UTC Modified: 2001-08-12 01:49 UTC
From: mikepc143 at home dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.0.6 OS: Windows 2000, Service Pack 2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mikepc143 at home dot com
New email:
PHP Version: OS:

 

 [2001-08-12 01:36 UTC] mikepc143 at home dot com
/* class.user.php included from required file classes.php */
// class definition is as follows:
 class User
	{
		var $username;
		var $userid;
        var $email;
		var $logged_in;
		var $on_from;
		var $goto;
		var $time_on;
		var $msglock;

        function set_email($s)
        {
                 $this->email = $s;
        }
        
        function get_email()
        {
                 return $this->email;
        }
        
		function set_username($s)
		{
		      $this-> username = $s;
		}
		function log_in($id,$u, $mip, $timeclock, $pri=1)
		{
			$this-> on_from = $mip;
			$this-> time_on = $timeclock;
			$this-> username = $u;
			$this-> guildid = $pri;
			$this-> userid = $id;
			$this-> logged_in = true;
		}
	}


    class Site {};


    $SITE = new Site;
    

    $SITE-> wwwroot = "www.gamebaz.com";
    $SITE-> droot = "D:/gamebaz/gm/";
    $SITE-> libdir = $SITE-> droot . "lib";

    require("$SITE->libdir/stdlib.php");
    require("$SITE->libdir/dblib.php");
    require("$SITE->libdir/classes.php");
    require("$SITE->libdir/main_logic.php");
    require("$SITE->libdir/form_validation.php");
    require("$SITE->libdir/error.php");
    
    if(!isset($this_user))  
/* 
This code runs half the time, and the other times it doesn't I haven't been able to narrow it down 
I changed nothing in the include files, just all the sudden
it thinks that $this_user is never registered again.

*/
    {
    	   @session_start();
           global $this_user;

            $this_user = new User("","","","","","","","");
            
            @session_register("this_user");
            
            printf("Starting new user<br>");
            
    }

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-12 01:49 UTC] sniper@php.net
Please ask support questions on appropriate mailing
list, found at: http://www.php.net/support.php


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 19:01:35 2025 UTC