Reputation: 81
Opencart version: 1.5.6.4
I have a fresh opencart installation, in a shared hosting environment. Everything runs smoothly until I try to log in into the admin account. I get the following error:
Fatal error: Uncaught exception 'ErrorException' with message 'Error: MySQL server has gone away<br />Error No: 2006<br />UPDATE oc_currency SET value = '1.00000', date_modified = '2015-02-21 05:56:24' WHERE code = 'USD'' in /home/ajast1ij/public_html/<site>/system/database/mysqli.php:41 Stack trace: #0 /home/ajast1ij/public_html/<site>/system/library/db.php(20): DBMySQLi->query('UPDATE oc_curre...') #1 /home/ajast1ij/public_html/<site>/admin/model/localisation/currency.php(141): DB->query('UPDATE oc_curre...') #2 /home/ajast1ij/public_html/<site>/admin/controller/common/home.php(193): ModelLocalisationCurrency->updateCurrencies() #3 [internal function]: ControllerCommonHome->index() #4 /home/ajast1ij/public_html/<site>/system/engine/front.php(42): call_user_func_array(Array, Array) #5 /home/ajast1ij/public_html/<site>/system/engine/front.php(29): Front->execute(Object(Action)) #6 /home/ajast1ij/public_html/<site>/admin/index.php(162): Front->dispatch(Object(Action), Object(Action)) #7 { in /home/ajast1ij/public_html/<site>/system/database/mysqli.php on line 41
Making me unable to login. I think it is the currency autoupdate feature that is causing the trouble, I'd like to disable it from the database, but cannot find the relevant table. Help needed.
Upvotes: 1
Views: 2121
Reputation: 1085
it has to do with your server . just change its database engine from MyISAM to InnoDB. try to repair your database on server... it will solve your issue...
Upvotes: 0
Reputation: 9227
The setting is stored in the oc_setting
table.
This should disable it:
UPDATE `oc_setting` SET `value` = 0 WHERE `key` = 'config_currency_auto';
You can reenable it by changing it back to 1, or in System->Settings->Local
However, disabling it is not recommended and the error suggests a bigger issue, possibly a timeout. I'd check to see if your server is allowed to access the API URL: http://download.finance.yahoo.com/d/quotes.csv?s=GBPUSD=X,GBPEUR=X&f=sl1&e=.csv
Upvotes: 3