Errors when trying to pass PHP sessions!!
Permalink
Hello, I'm using the block here to try and incorporate php into my site:http://www.concrete5.org/community/forums/block_requests/simple_php...
In the block I wrote this:
session_start();
echo $_SESSION['first_name'];
When I try to publish my changes I get this:
Fatal error: method_exists() [<a href='function.method-exists'>function.method-exists</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "PHPCodeBlockController" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /usr/local/concrete5.3.3.1/concrete/libraries/database_indexed_search.php on line 135
Can someone help?
In the block I wrote this:
session_start();
echo $_SESSION['first_name'];
When I try to publish my changes I get this:
Fatal error: method_exists() [<a href='function.method-exists'>function.method-exists</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "PHPCodeBlockController" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /usr/local/concrete5.3.3.1/concrete/libraries/database_indexed_search.php on line 135
Can someone help?
you might want to try making a block, or coding this kind of thing directly into a page type or single page, instead of trying to do it through the php block