Bug #12188 Updated: Object with Sessiona
| From: | wedro at gmx dot net | Date: | Tue, 17 Jul 2001 09:06:12 +0000 |
| Subject: | Bug #12188 Updated: Object with Sessiona | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-60139@lists.php.net to get a copy of this message | ||
ID: 12188
User updated by: wedro@gmx.net
Reported By: wedro@gmx.net
Status: Feedback
Bug Type: Unknown/Other Function
Operating System:
PHP Version: 4.0.6
New Comment:
what is my error then ?
Previous Comments:
------------------------------------------------------------------------
[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