I am trying to update an old installation of CW 1.5.4 to the latest version. So far all seems to make sense, except when I have refreshed the browser I get this error:
Error: Could not load database driver mysql!
Looking at previous threads it definitely exists at system/database/mysql.php and has permissions 755 and even 777, nothing seems to make any difference.
The updated site is on a subdomain here: http://update.maisonhomeinteriors.com
Any ideas?
Also confirm your front end and admin config are updated with correct paths/setup if you are updating to a new version and it's pointing to the right folders to be looking for db drivers.
OCMobi - Opencart 1x and 2x native mobile applications, developer SDKs, Rest API, and custom services. Email us at support@ocmobi.com!
Pricing | Features | Custom Services
Facebook | Twitter | Google+ | Instagram
How do I switch the DB to mysqli ?
-Ryan
I did a search for "Edit the DB_DRIVER setting" as you suggested and got 11 replies none of which were helpful.
Could you possibly either tell me what to do or possible give me a link to the page showing all the magic answers?
Thanks!
OCMobi - Opencart 1x and 2x native mobile applications, developer SDKs, Rest API, and custom services. Email us at support@ocmobi.com!
Pricing | Features | Custom Services
Facebook | Twitter | Google+ | Instagram
I tried doing that - the error just changed to saying: Error: Could not load database driver mysqli!
Did you go through the install/setup script properly? Can you confirm your paths in both config files are correct? Check your php error log, you should see the exact error message w/ path and if the file isn't there than you know your path is wrong and the configs need to be updated.
OCMobi - Opencart 1x and 2x native mobile applications, developer SDKs, Rest API, and custom services. Email us at support@ocmobi.com!
Pricing | Features | Custom Services
Facebook | Twitter | Google+ | Instagram
These are my admin/ config.php settings:
<?php
// HTTP
define('HTTP_SERVER', 'http://update.maisonhomeinteriors.com/admin/');
define('HTTP_CATALOG', 'http://update.maisonhomeinteriors.com/');
define('HTTP_IMAGE', 'http://update.maisonhomeinteriors.com/image/');
// HTTPS
define('HTTPS_SERVER', 'http://update.maisonhomeinteriors.com/admin/');
define('HTTPS_CATALOG', 'https://update.maisonhomeinteriors.com/');
define('HTTPS_IMAGE', 'https://update.maisonhomeinteriors.com/image/');
// DIR
define('DIR_APPLICATION', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/admin/');
define('DIR_SYSTEM', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/');
define('DIR_DATABASE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/database/');
define('DIR_LANGUAGE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/admin/language/');
define('DIR_TEMPLATE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/admin/view/template/');
define('DIR_CONFIG', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/config/');
define('DIR_IMAGE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/image/');
define('DIR_CACHE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/cache/');
define('DIR_DOWNLOAD', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/download/');
define('DIR_LOGS', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/logs/');
define('DIR_CATALOG', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/catalog/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'XXXXXXX');
define('DB_PASSWORD', 'XXXX');
define('DB_DATABASE', 'XXXXXX');
define('DB_PREFIX', '');
?>
And the settings for the root config.php
<?php
// HTTP
define('HTTP_SERVER', 'http://update.maisonhomeinteriors.com/');
define('HTTP_IMAGE', 'http://update.maisonhomeinteriors.com/image/');
define('HTTP_ADMIN', 'http://update.maisonhomeinteriors.com/admin/');
// HTTPS
define('HTTPS_SERVER', 'https://update.maisonhomeinteriors.com/');
define('HTTPS_IMAGE', 'https://update.maisonhomeinteriors.com/image/');
// DIR
define('DIR_APPLICATION', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/catalog/');
define('DIR_SYSTEM', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/');
define('DIR_DATABASE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/database/');
define('DIR_LANGUAGE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/catalog/language/');
define('DIR_TEMPLATE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/catalog/view/theme/');
define('DIR_CONFIG', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/config/');
define('DIR_IMAGE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/image/');
define('DIR_CACHE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/cache/');
define('DIR_DOWNLOAD', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/download/');
define('DIR_LOGS', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/logs/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', XXXXX');
define('DB_PASSWORD', 'XXXXXX');
define('DB_DATABASE', 'XXXXXX');
define('DB_PREFIX', '');
?>
OCMobi - Opencart 1x and 2x native mobile applications, developer SDKs, Rest API, and custom services. Email us at support@ocmobi.com!
Pricing | Features | Custom Services
Facebook | Twitter | Google+ | Instagram
Sorry, still no luck. I duplicated the file mysql.php in the database folder and renamed it mysqli.php, so both now exist.
So going to: http://update.maisonhomeinteriors.com/s ... mysqli.php you get a blank page not a 404, so it does exist.
I have checked the permissions and they are both set to 755 or 777, neither of which fix it.
---
I have now deleted the contents of both config.php and admin/config.php files so that I can try redoing the install.
I have gone through the installation process again and STILL get the same error:
Error: Could not load database driver mysqli!
---
Sorry to be a pain, Any other ideas?
The mysql.php and mysqli.php files are both stored here: system/library/db/
So does that mean in my config.php documents, the location of the file should actually read:
define('DIR_DATABASE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/library/db/');
instead of this:
define('DIR_DATABASE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/database/');
I have deleted everything in both config.php and admin/config.php documents. Then tried to go back to the subdomain.mywebsite.com/install file which once I have filled it all in again says everything is ok. I get the screen saying all the files are there and writable. Finally getting the screen that says all installed and for me to remember to delete my install folder.
When I then click on either of the links to my shop or the admin, both of them still say:
Error: Could not load database driver mysqli!
Is there anything anyone can suggest I do rather than delete the whole update and start afresh updating all the files into my old version of CW? (this took a day and a half last time!).
help please!
Code: Select all
/var/www/vhosts/maisonhomeinteriors.com/update/system/database/
Just thinking out loud.
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
Yes it is definitely there - I have been uploading files to it.
I did have a thought that the actual NAME of the subdomain might be the problem? called "UPDATE" but I am sure there are no restrictions on subdomain names.
Any other thoughts gratefully received!
I attached a fresh copy of mysqli.phpSorry, still no luck. I duplicated the file mysql.php in the database folder and renamed it mysqli.php, so both now exist.
Put it in your system/database folder.
This also should work
Code: Select all
define('DIR_DATABASE', 'system/database/');
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
I have added define('DIR_DATABASE', 'system/database/'); to both config.php files and uploaded the new file...
Sadly still not a squeak of a difference.
Here it the content of the config.php file created:
<?php
// HTTP
define('HTTP_SERVER', 'http://update.maisonhomeinteriors.com/');
// HTTPS
define('HTTPS_SERVER', 'http://update.maisonhomeinteriors.com/');
// DIR
define('DIR_DATABASE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/database/');
define('DIR_APPLICATION', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/catalog/');
define('DIR_SYSTEM', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/');
define('DIR_LANGUAGE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/catalog/language/');
define('DIR_TEMPLATE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/catalog/view/theme/');
define('DIR_CONFIG', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/config/');
define('DIR_IMAGE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/image/');
define('DIR_CACHE', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/cache/');
define('DIR_DOWNLOAD', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/download/');
define('DIR_UPLOAD', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/upload/');
define('DIR_MODIFICATION', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/modification/');
define('DIR_LOGS', '/var/www/vhosts/maisonhomeinteriors.com/subdomains/update/system/logs/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'XXXXXX');
define('DB_PASSWORD', 'XXXXXX');
define('DB_DATABASE', 'XXXXX');
define('DB_PREFIX', '');
So you are using OC2? In that case you need a different library/db/mysqli.phpdefine('DIR_MODIFICATION'
In my config for OC v2.0.2.0 is no define for the database.
edit: On further inspection, OC2 uses the autoloader in startup.php which loads all the needed libraries. IOW no more need for a db define.
So check the library/db.php and library/db/mysqli.php
Or... it has to do with namespaces, see if your PHP version is >= 5.3.0 although you shouldn't have been able to install.
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
I was sent a different version of the mysqli.php file yesterday. One of them starts:
<?php
namespace DB;
final class MySQLi {
private $link;
The other one starts:
<?php
final class DBMySQLi {
private $link;
Which is the correct one?
I am confused! Trying either one of them I still get the error. I am using PHP Version 5.3.29.
I am beginning to think I have no choice but to spend another day going through every single file from the latest version of OC and updating my copy again - not something I relish! : (
It seems like this installation of yours is for testing and is empty? Start from scratch with the correct files, no upgrade, just all new beginnings
I wouldn't mind checking it for you if nothing helps. A PM is ok.
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
Users browsing this forum: No registered users and 47 guests