Fatal error: Call to a member function Execute() on a non-object in
Fatal error: Call to a member function Execute() on a non-object in pnSession.php
php 5.2.0 update problem
With zen-cart
Edit
/includes/functions/sessions.php
and /admin/includes/functions/sessions.php, if it exists on your site:
function _sess_write($key, $val) {
global $db;
global $SESS_LIFE;
Change to:
function _sess_write($key, $val) {
// The following is only to work around a PHP 5.2.0 bug:
global $db;
if (!is_object($db)) {
//PHP 5.2.0 bug workaround …
$db = new queryFactory();
$db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);
}
global $SESS_LIFE;
With PostNuke
I modified includes/pnSession.php in order to add in function pnSessionSetup()
if (version_compare(phpversion(), ‘5.2.0′, ‘>=’))
{
register_shutdown_function(’session_write_close’);
}
session_set_save_handler(’pnSessionOpen’,
‘pnSessionClose’,
‘pnSessionRead’,
‘pnSessionWrite’,
‘pnSessionDestroy’,
‘pnSessionGC’);
bug:
If functions are called within __destruct without
register_shutdown_function being called on __destruct within a class,
and global variables that are classes will not work. This is a bug
specificly with PHP 5.2.0.
http://bugs.php.net/bug.php?id=39381
http://www.zen-cart.com/forum/showthread.php?p=287587
http://community.postnuke.com/module-Forum-viewtopic-topic-50938-start-0.htm
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.



Leave a Reply