TCH-Alex Posted November 28, 2007 Share Posted November 28, 2007 Here is the fix for Zen Cart on Php/Mysql 5 for throwing the following error. ZENCART Fatal error: Call to a member function Execute() on a non-object in /home/xxxxxxxx/public_html/INSTALL_FOLDER/includes/functions/sessions.php on line 61 NOTE : please take a backup of includes/functions/sessions.php before editing. >edit includes/functions/sessions.php Code: function _sess_write($key, $val) { global $db; global $SESS_LIFE; change to: Code: 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; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.