Reputation: 2291
I have downloaded opencart 2.0 yesterday for testing it and after I installed vqmod latest 2.4.1 I started receiving the error Error: Could not load database driver mysqli!. I searched regarding this error and found something related to the leading slash, but after I got an error like 'Notice: Error: Could not load class Config.php!'. Current config.php
define('HTTP_SERVER', 'http://localhost/opencart/affiliate-payments/');
// HTTPS
define('HTTPS_SERVER', 'http://localhost/opencart/affiliate-payments/');
// DIR
define('DIR_APPLICATION', 'F:/SERVER/htdocs/opencart/affiliate-payments/catalog/');
define('DIR_SYSTEM', 'F:/SERVER/htdocs/opencart/affiliate-payments/system/');
define('DIR_LANGUAGE', 'F:/SERVER/htdocs/opencart/affiliate-payments/catalog/language/');
define('DIR_TEMPLATE', 'F:/SERVER/htdocs/opencart/affiliate-payments/catalog/view/theme/');
define('DIR_CONFIG', 'F:/SERVER/htdocs/opencart/affiliate-payments/system/config/');
define('DIR_IMAGE', 'F:/SERVER/htdocs/opencart/affiliate-payments/image/');
define('DIR_CACHE', 'F:/SERVER/htdocs/opencart/affiliate-payments/system/cache/');
define('DIR_DOWNLOAD', 'F:/SERVER/htdocs/opencart/affiliate-payments/system/download/');
define('DIR_MODIFICATION', 'F:/SERVER/htdocs/opencart/affiliate-payments/system/modification/');
define('DIR_LOGS', 'F:/SERVER/htdocs/opencart/affiliate-payments/system/logs/');
In the current configuration I get Error: Could not load database driver mysqli!
If I remove also the slash, like if I remove entirely F:/SERVER/htdocs/opencart/affiliate-payments/
I get same error Error: Could not load database driver mysqli!
if I remove F:/SERVER/htdocs/opencart/affiliate-payments
I get Notice: Error: Could not load class Config.php! in F:\SERVER\htdocs\opencart\affiliate-payments\system\startup.php on line 74
Upvotes: 2
Views: 17168
Reputation: 11
I had the same problem when I moved from one host to another.
define('DIR_DATABASE', '/storage/content/72/2000872/itdestination.se/public_html/database/');
I replaced it with below line
define('DIR_DATABASE', '/storage/content/72/2000872/itdestination.se/public_html/system/database/');
/system
was missing in my old DIR_database.
Upvotes: 1
Reputation: 51
You seem to be missing the following line in your config.php file which appears usually after define('DIR_SYSTEM', '../system/');
define('DIR_DATABASE', '../system/database/');
I would go back to relative paths, keep in mind there are two config files, one in the root of the site and one in admin. You need to add the '../system' in the admin one if the one in root is 'system'
Upvotes: 2
Reputation: 668
please make sure you are using php version less than 5.5 for this open cart version else download higher open cart version
Upvotes: 3