|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3974 Object properties produce unexpected results upon registering them to a session
Submitted: 2000-03-29 22:55 UTC Modified: 2000-07-06 08:53 UTC
From: seth at subimage dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.0 Release Candidate 1 OS: Redhat Linux 6.1
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.
Block user comment
Status: Assign to:
Bug Type:
From: seth at subimage dot com
New email:
PHP Version: OS:


 [2000-03-29 22:55 UTC] seth at subimage dot com
When I create an instance of an object, register it to the session, and access it's properties from that page, all appear fine.

After going to the next page, starting the session, and trying to read properties, they either don't appear or come back with values from _other_ variables!!!

In this instance, sometimes I get back nothing on the second page for the variable $auth->id, but sometimes I get the value of $user!!!


class Auth {
  // properties
  var $classname   = "Auth";
  var $lifetime    = 0;
  var $id          = "";
  var $md5pass     = "";
  var $sharedValue = "";
  var $auth        = false;
  var $crack       = "";

  function Auth() {
    $this->sharedValue = md5(uniqid(rand()));
  function setcrack($crack) {
    $this->crack = $crack;
  function setid($id) {
    $this->id = $id;

first page...

$auth = new Auth();
$auth->setid("this is the auth user");

(note, the html on this page has 2 input boxes, "user" and "password")

second page...


$results = $auth->validate($user, $password);

  client pass: <?= $clientPassword ?>
  server pass: <?= $serverPassword ?>
  user id: <?= $user ?>
  password: <?= $password ?>
  shared value: <?= $auth->sharedValue ?>
  results: <?= $results ?>
  authcrack: <?= $auth->crack ?>
  authuser: <?= $auth->id ?>
  authauth: <? $auth->auth ?>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-06 08:53 UTC] sas at cvs dot php dot net
Please upgrade to the latest PHP release. If the problem persists, try to create a short testcase and submit a new bug report.
 [2003-04-01 02:03 UTC] chelseak at mail dot bg
ArtsKey v4.1 ser. # & crack
 [2003-04-01 02:03 UTC] chelseak at mail dot bg
ArtsKey v4.1 ser. # & crack
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 23 19:01:38 2024 UTC