ID:               15310
 Comment by:       uriiniix at gmail dot com
 Reported By:      nail at bowling dot nsk dot su
 Status:           No Feedback
 Bug Type:         Session related
 Operating System: linux
 PHP Version:      4.1.1
 New Comment:

The problem still here. I wonder why you haven't fixed yet! 6 years
passed!!!! 

The problem is next: 
I have 3 files:

------ session.php ----------

class Session {
 
  function Session()
  {
      session_start();
  }

  function RegObject($object)
  {
     session_register('object_instance');
     $_SESSION['object_instance'] = $objects;
  }

  function GetObject()
  {
     return $_SESSION['object_instance'];
  }
}


-------- addObject.php --------------

  $session = new Session();
  $obj = new ObjectClass();


  $session->RegObject($obj);



--------- getObject.php -------------

  $session = new Session();
  $obj = $session->GetObject();

  print ">>>".$obj; // Here as output should be error that ObjectClass
could not be converted to string, but only ">>>" printed


The root of the problem seams in accessing $_SESSION.


Previous Comments:
------------------------------------------------------------------------

[2007-10-12 19:41:18] dharmesh_radadiyaa at hotmail dot com

what is meaning of session?
what is meaning of register?
what is meaning of cookies?

------------------------------------------------------------------------

[2007-10-12 19:39:59] dharmesh_radadiyaa at hotmail dot com

what is meaning of session?
what is meaning of register?
what is meaning of cookies?

------------------------------------------------------------------------

[2002-07-25 23:31:32] bemore15 at yahoo dot com

I have this bug on Windows 2000 PHP 4.2.1.

$member = $auth->create_member_object($login, $password);
$_SESSION["member"] = $member;
$member->init();

...
$member->init() redirects the session to another page
That page starts:

<?

require ("includes/common.php");
$member = $_SESSION["member"];

...
I have this bug regardless of the order of the following lines:

require ("includes/common.php");
$member = $_SESSION["member"];
session_start()

...
The output is:
Notice: Undefined index: member in [file].php on line 4

------------------------------------------------------------------------

[2002-07-02 01:00:07] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2002-06-01 11:43:36] [EMAIL PROTECTED]

Somehow the responses got out of sync.

Please a) try a newer version of PHP (we're at 4.2.1) and b) try a new,
self-contained example with the suggestions given.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/15310

-- 
Edit this bug report at http://bugs.php.net/?id=15310&edit=1

Reply via email to