[PHP-DEV] PHP 4.0 Bug #7530 Updated: Session does not store Objects From: waldschrott <email protected>
Date: 11/27/00

ID: 7530
Updated by: waldschrott
Reported By: ori <email protected>
Status: Closed
Bug Type: *Session related
Assigned To:
Comments:

ori, if you check it again, don't use your script supplied
in this bug report, there are errors in it...
1) $SESSION["Counter"]->add();

works for me too

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

[2000-11-27 08:51:03] sniper <email protected>
Should be fixed in CVS. Please try latest snapshot from
http://snaps.php.net/ and reopen this bug report if
this doesn't work with it.

--Jani

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

[2000-11-27 08:50:54] sniper <email protected>
Should be fixed in CVS. Please try latest snapshot from
http://snaps.php.net/ and reopen this bug report if
this doesn't work with it.

--Jani

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

[2000-11-01 07:12:10] ori <email protected>
The entire script I used is long - here is a summary:

<?
class Counter
{
        var $counter;
        
        function add()
        {
                return $this->counter++;
        }
}

session_start();
session_register("SESSION");

/* initialise the SESSION variable if necessary */
if (!isset($SESSION)) {
        $SESSION = array();
}

/* initialise the Counter objct if necessary */
if (!isset($SESSION["Counter"])) {
        $SESSION["Counter"] = new Counter;
}

echo "Visits using normal variables: " . $SESSION["visit"]++;
echo "<BR>";
echo "Visits using classes: " . $SESSION["counter"]->add;
?>

Ori

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

[2000-11-01 06:59:59] andi <email protected>
Can you create a small reproducing script? That would help out a lot.

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

[2000-11-01 06:52:03] ori <email protected>
recompiled using the 4.0.3pl1 and the register_globals in on. There is still a problem with objects in the $SESSION array.

If you need to take a look at the application - I may be able to allow access to HTTP on my linux box.

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

The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online.

Full Bug description available at: http://bugs.php.net/?id=7530

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>