Post by ideep13 » Mon Oct 19, 2015 4:34 am

Hi,

I am having the following error.. I upgraded from 1.5.1.3. to 2.0.3.1. and I can't access admin folder

this is the error:
Parse error: syntax error, unexpected 'DB_DRIVER' (T_STRING) in /home/content/70/8653470/html/admin/config.php on line 27
this is in config.php file:

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'http://www.staskka.com/admin/');
define('HTTP_CATALOG', 'http://www.staskka.com/');
define('HTTP_IMAGE', 'http://www.staskka.com/image/');

// HTTPS
define('HTTPS_SERVER', 'http://www.staskka.com/admin/');
define('HTTPS_IMAGE', 'http://www.staskka.com/image/');

// DIR
define('DIR_APPLICATION', '/home/content/70/8653470/html/admin/');
define('DIR_SYSTEM', '/home/content/70/8653470/html/system/');
define('DIR_DATABASE', '/home/content/70/8653470/html/system/database/');
define('DIR_LANGUAGE', '/home/content/70/8653470/html/admin/language/');
define('DIR_TEMPLATE', '/home/content/70/8653470/html/admin/view/template/');
define('DIR_CONFIG', '/home/content/70/8653470/html/system/config/');
define('DIR_IMAGE', '/home/content/70/8653470/html/image/');
define('DIR_CACHE', '/home/content/70/8653470/html/system/cache/');
define('DIR_DOWNLOAD', '/home/content/70/8653470/html/download/');
define('DIR_LOGS', '/home/content/70/8653470/html/system/logs/');
define('DIR_CATALOG', '/home/content/70/8653470/html/catalog/');
define(‘DIR_MODIFICATION’, ‘admin/system/modification/’); 

// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'yabadabadoo');
define('DB_USERNAME', 'yabadabadoo');
define('DB_PASSWORD', 'yabadabadoo');
define('DB_DATABASE', 'doo');
define('DB_PREFIX', 'oc_');
?>
Also config.php file is changed in subfolder..

Any help is much appreciated--

User avatar
Active Member

Posts

Joined
Mon Jun 18, 2012 2:47 am

Post by ideep13 » Mon Oct 19, 2015 5:32 am

and this is showing as well, please help what to do next

Notice: Error: MySQL server has gone away
Error No: 2006
SELECT * FROM `oc_language` in /home/content/70/8653470/html/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /home/content/70/8653470/html/admin/index.php on line 115Warning: Invalid argument supplied for foreach() in /home/content/70/8653470/html/admin/index.php on line 115Notice: Undefined index: en in /home/content/70/8653470/html/admin/index.php on line 119Notice: Undefined index: en in /home/content/70/8653470/html/admin/index.php on line 122Notice: Undefined index: en in /home/content/70/8653470/html/admin/index.php on line 123Notice: Error: MySQL server has gone away
Error No: 2006
SELECT * FROM oc_currency in /home/content/70/8653470/html/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /home/content/70/8653470/html/system/library/currency.php on line 15Warning: Invalid argument supplied for foreach() in /home/content/70/8653470/html/system/library/currency.php on line 15Notice: Error: MySQL server has gone away
Error No: 2006
SELECT * FROM oc_weight_class wc LEFT JOIN oc_weight_class_description wcd ON (wc.weight_class_id = wcd.weight_class_id) WHERE wcd.language_id = '0' in /home/content/70/8653470/html/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /home/content/70/8653470/html/system/library/weight.php on line 11Warning: Invalid argument supplied for foreach() in /home/content/70/8653470/html/system/library/weight.php on line 11Notice: Error: MySQL server has gone away
Error No: 2006
SELECT * FROM oc_length_class mc LEFT JOIN oc_length_class_description mcd ON (mc.length_class_id = mcd.length_class_id) WHERE mcd.language_id = '0' in /home/content/70/8653470/html/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /home/content/70/8653470/html/system/library/length.php on line 11Warning: Invalid argument supplied for foreach() in /home/content/70/8653470/html/system/library/length.php on line 11Notice: Error: MySQL server has gone away
Error No: 2006
SELECT * FROM oc_extension WHERE `type` = 'openbay' in /home/content/70/8653470/html/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /home/content/70/8653470/html/system/library/openbay.php on line 118Warning: Invalid argument supplied for foreach() in /home/content/70/8653470/html/system/library/openbay.php on line 118Notice: Error: MySQL server has gone away
Error No: 2006
SELECT * FROM oc_event in /home/content/70/8653470/html/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /home/content/70/8653470/html/admin/index.php on line 150Warning: Invalid argument supplied for foreach() in /home/content/70/8653470/html/admin/index.php on line 150Notice: Error: MySQL server has gone away
Error No: 2006
SELECT * FROM oc_user WHERE username = 'xxxxxxx' AND (password = xxxxx OR password = 'xxxxxxxx') AND status = '1' in /home/content/70/8653470/html/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /home/content/70/8653470/html/system/library/user.php on line 40

User avatar
Active Member

Posts

Joined
Mon Jun 18, 2012 2:47 am

Post by uksitebuilder » Mon Oct 19, 2015 6:31 pm

mysql driver is deprecated in latest PHP and v2.x

You should update the line in config.php and admin/config.php

from

Code: Select all

define('DB_DRIVER', 'mysql');
to

Code: Select all

define('DB_DRIVER', 'mysqli');

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by HAO » Tue Nov 01, 2016 10:40 am

My OpenCart 2.1.0.2 also has the same problem, And config.php I have modified to mysqli.
Why does this error message always occur?

My environment: PHP 5.6.27
Mysql.connect_timeout 60 is related to this?

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm
Who is online

Users browsing this forum: No registered users and 4 guests