Jump to content

Zen Cart Fix On Php/mysql 5


TCH-Alex

Recommended Posts

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;

Link to comment
Share on other sites

  • The topic was unpinned

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...