Bug #12188 Updated: Object with Sessiona

From: Date: Mon, 20 Aug 2001 16:16:49 +0000
Subject: Bug #12188 Updated: Object with Sessiona
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-63878@lists.php.net to get a copy of this message
ID: 12188 Updated by: sniper Reported By: wedro@gmx.net Old Status: Feedback Status: Open Bug Type: Session related Operating System: PHP Version: 4.0.6 New Comment: status->open Previous Comments: ------------------------------------------------------------------------ [2001-07-17 05:06:10] wedro@gmx.net what is my error then ? ------------------------------------------------------------------------ [2001-07-16 16:23:10] cmv@php.net This works perfectly for me. If I keep reloading that page I get: a Object ( [a] => 1 ) a Object ( [a] => 2 ) a Object ( [a] => 3 ) a Object ( [a] => 4 ) ... - Colin ------------------------------------------------------------------------ [2001-07-16 16:03:05] wedro@gmx.net Fatal error: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition stati of the object you are trying to operate on was loaded _before_ the session was started in /var/www/wedr0/test/para4.php on line 12 ------------------------------------------------------------------------ [2001-07-16 11:37:09] hholzgra@php.net ... and the problem is ... ? ------------------------------------------------------------------------ [2001-07-16 11:19:57] wedro@gmx.net class A { var $a; function add(){ $this->a++; } } session_register('a'); if (!is_object($a)){ $a = new A(); } $a->add(); print_r($a); ======================================================================================================================== Modules : "./configure" \ "--with-iconv" \ "--with-mysql" \ "--with-apxs=/usr/local/apache/bin/apxs" \ "--with-xml" \ "--with-sablot" \ "--with-swf=/usr/local/src/dist" \ "-enable-sysvsem" \ "-enable-sysvshm" \ "-enable-trans-sid" \ "-enable-track-vars" \ "-enable-register-globals" \ "$@" ============================================================ ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12188&edit=1

« previous php.dev (#63878) next »