Hi everybody,
we are having proplems passing data which is stored in an object to another page. The first page (page1.html) instantiates an object and registers it to the session.
The second page tries to get the data back from the object using the class definition in SomeClassName.obj.
Page2 will not allow me to get the data back because it does not load the class definitions properly.
The following code works under NT, but will not work on Solaris (dynamically linked to apache)
Here is page1.html
<?
session_start();
include ("SomeClassName.obj");
session_register ("inst1");
$inst1 = new SomeClassName();
$inst1->message = "OH, this is a Bummer!";
print $inst1 . "<BR><BR>";
?>
<a href="page2.html">GO TO NEXT PAGE</a>
Here is page2.html
<?
session_start();
include ("SomeClassName.obj");
print $inst1->message;
?>
Here is SomeClassName.obj
<?
class SomeClassName {
var $message;
}
?>
Here is the error message of page2:
Fatal error: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition someclassname of the object you are trying to operate on was loaded before the session was started in /www/dev1/htdocs/page2.html on line 7
Can anybody give me a hint why this does not work under Solaris? Do I need to specify an additional compiling option for PHP to enable class definition caching?
Looking forward to your answers.
Thomas