Guest Posted July 26, 2012 Share Posted July 26, 2012 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. Quote Link to comment Share on other sites More sharing options...
Toucan Web Design Posted July 26, 2012 Share Posted July 26, 2012 Does it throw up a lot of php warnings? If so, have a search for php deprecated warning fix, that'll do the job. If it's something else, not sure, you would need to post the errors you're getting Quote Link to comment Share on other sites More sharing options...
Guest Posted July 26, 2012 Share Posted July 26, 2012 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 Quote Link to comment Share on other sites More sharing options...
Toucan Web Design Posted July 26, 2012 Share Posted July 26, 2012 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 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 26, 2012 Share Posted July 26, 2012 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()); Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 27, 2012 Share Posted July 27, 2012 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))); Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 27, 2012 Share Posted July 27, 2012 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. Quote Link to comment Share on other sites More sharing options...
Guest Landrollerinc Posted July 27, 2012 Share Posted July 27, 2012 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. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 27, 2012 Share Posted July 27, 2012 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? Quote Link to comment Share on other sites More sharing options...
NetRover Posted June 20, 2013 Share Posted June 20, 2013 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 Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 20, 2013 Share Posted June 20, 2013 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. 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.