Jump to content

Tons of PHP errors after PHP upgrade to 5.3


Guest

Recommended Posts

As I've read, this is a common issue, however my hosting server did not warn me before they upgraded the PHP and now I am left with a cubecart back-end that I cannot access. I have about 2 dozen pending orders and a bunch of info that I am scrambling to trace. Is there a way out of this? I am able to access all the pending orders through SQLyog, but I am worried about other things like API usernames/passwords for shipping modules, payments, etc.

Link to comment
Share on other sites

Yes, and I replaced the ini.inc.php with the newer version, and now the main page loads, but when I try to access the administration session, I get this:

MySQL Error Occurred

Error Message:

1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND blockTime < 1343306711' at line 1

SQL:

SELECT adminId FROM CubeCart_admin_users WHERE username = 'USER' AND password = 'MD5HashPassword' AND failLevel < AND blockTime < 1343306711

Link to comment
Share on other sites

Can't find where that query is run exactly, sadly.. not one that includes failLevel like that. I'd guess that something has happened to corrupt or otherwise ruin the config, and that it can't track the number of attempts to try before blocking.

Could try restoring a copy of the config in the database

Failing that, if you could post your version of CubeCart, we could try finding the query, but couldn't see it in any of the newer versions. If you're on an older version, may need an update to work with the new version of php

Link to comment
Share on other sites

I am not sure what you mean by restore the config in the database.

I believe it is 4.2.2 that I am running. The SQL call is in classes/session/cc_admin_session.php (Line 93)


$query = sprintf("SELECT adminId FROM %sCubeCart_admin_users WHERE username = %s AND password = %s AND failLevel < %s AND blockTime < %s", $this->glob['dbprefix'], $this->db->mySQLSafe($username), $this->db->mySQLSafe(md5($password)), $this->ini['bfattempts'], time());

Link to comment
Share on other sites

Let's just get you in first, then we can figure out what's going wrong.

The line of code you found above, change to:


$query = sprintf("SELECT adminId FROM %sCubeCart_admin_users WHERE username = %s AND password = %s", $this->glob['dbprefix'], $this->db->mySQLSafe($username), $this->db->mySQLSafe(md5($password)));

Link to comment
Share on other sites

CC4.2.2 may, in fact, have a serious difficulty running under PHP 5.3.

The reason is because (the oldest copy of CC4 I have is 4.3.8) does not have a proper copy of Zend Optimizer (aka Zend Guard) that operates in PHP 5.3.

CC4 and CC5 gives the installer a choice of using ionCube or Zend. At some point, Devellion started shipping separate files of Zend for PHP 5.2 (and earlier) and PHP 5.3. (Zend has not built its products for PHP 5.4 as yet.)

The question you need to answer is: is your CC4 running under ionCube or Zend? You can learn this by examining the file /includes/global.inc.php and noting the value for $glob['encoder'].

The earliest spot to look at for is where did the array $ini go to? It is set in ini.inc.php, then brought into the function __construct in the file /classes/session/cc_admin_session.php.

Could you reply with the first 20-25 lines (not the comments) of cc_admin_session.php. I would like to see if the class constructor could be incompatible with PHP 5.3.

Link to comment
Share on other sites

Guest Landrollerinc

I am encountering this same issue. Our host upgraded to PHP 5.3 last night. The error screen references Zend gaurd, but I am finding a folder for IONCube in the store folder.

Being a non-technical person, this is a nightmare. Our business is shut down.

We have a new website being built, but will not be online for several more weeks. The developer will be getting the store configured.

Would upgrading to Cubecart 5 be a temporary fix?

Is there a fix or do I need to purchase support? Very frustrating. Our Cubecart experience has been a tough one.

Website is www.landroller.com which you can get to, but the store is down.

Link to comment
Share on other sites

Going to CC5 will not be a satisfactory fix.

The fact that there is a folder named ionCube means nothing.

You must do these things:

* locate the file /includes/global.inc.php in your store, open it for editing, and change the appropriate line to read: $glob['encoder'] = 'ioncube';

* place an emergency call to your hosting provider to have them install ionCube (the proper version for PHP 5.3) into your account (if it's not already installed).

Let us know how it goes.

Well... Ok, maybe the above is not what's needed.

PHP is trying to run the file index_php5.3_enc_zend.php but can't parse it. That tells me the hosting provider has not updated the Zend Guard PHP extension to the PHP 5.3 version. I presume you have a call in to your hosting provider?

Link to comment
Share on other sites

  • 10 months later...

Hi there, has anyone managed to fix this error and able to provide an easy answer for me?

 

My host has also upgraded and now the admin login produces the same error:-

MySQL Error Occured
1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND blockTime < 1371718877' at line 1

QUERY = SELECT adminId FROM CubeCart_admin_users WHERE username = 'admin' AND password = '66004df9455ca469088c563d8ff96f793b561' AND failLevel < AND blockTime < 1371718877
Link to comment
Share on other sites

AND failLevel < [THIS IS MISSING] AND blockTime < 1371718877

 

On the surface, I am going to guess that the version of CubeCart 4 got upgraded (to include a check for fail-level), but the database does not yet have this column (to read an existing value).

 

I'm not sure how upgrading PHP would affect this.

 

You might get better assistance in the CubeCart 4 forum at www.cubecartforums.org.

Link to comment
Share on other sites

Join the conversation

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

Guest
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...