Results 1 to 5 of 5
-
Error: Could not load database file mysql!
16 Aug 2012 @ 13.38 Hello guys,
I developed a website in OpenCart locally. Now, i have uploaded it to my web-hosting server. The front end of the e-shop loads properly but when i try to load backoffice or admin area, i am getting Error: Could not load database file mysql!
What could be the possible reason? i asked some friend and he told me that this sort of errors are basically driver errors...have your say and please help me to solve this.
-
16 Aug 2012 @ 16.05 Two threads on the OpenCart forum that could offer some insight:
OpenCart Community • View topic - "Error: Could not load database file mysql!"
OpenCart Community • View topic - Error: Could not load database file mysql!
The two main suggestions are to a) check mysql.php permissions (755 or 775) and/or b) install a fresh copy of OpenCart on the server, create a backup of your local version and restore it to the remote version. You'll need to upload any mods/themes/custom files.
-
16 Aug 2012 @ 18.10 Thanks Frinkky, for your comment.
changing rights permission didnt help at all. i can only see the solution by installing a fresh copy of OpenCart.
-
21 Aug 2012 @ 14.14 So.. I downloaded the system and tracked where that error is occuring.
Its happening in 'system/library/db.php' and is caused by a missing file.
Tracking this back I looked for where the DIR_DATABASE constant is defined and found this.PHP Code:if (file_exists(DIR_DATABASE . $driver . '.php')) {
Now.. I cannot find where DIR_SYSTEM is defined. I assume it is in your config file. Basically, I think you installed the open cart software on your computer and then didn't update the config file correctly for the new environment.Code:define('DIR_DATABASE', DIR_SYSTEM . 'database/');
Looking it up.
Config files
I suggest you open up the index.php file on your server and add the following line at the top.
View the site in your browser and you will then see the path on your server to your application.PHP Code:echo getcwd();exit;
You then need to change all these variables so they have the correct path.
Delete the line above from your index.php file and you should be up and running.
// DIR
define('DIR_APPLICATION', '/home/xxxx/public_html/shop/catalog/');
define('DIR_SYSTEM', '/home/xxxx/public_html/shop/system/');
define('DIR_DATABASE', '/home/xxxx/public_html/shop/system/database/');
define('DIR_LANGUAGE', '/home/xxxx/public_html/shop/catalog/language/');
define('DIR_TEMPLATE', '/home/xxxx/public_html/shop/catalog/view/theme/');
define('DIR_CONFIG', '/home/xxxx/public_html/shop/system/config/');
define('DIR_IMAGE', '/home/xxxx/public_html/shop/image/');
define('DIR_CACHE', '/home/xxxx/public_html/shop/system/cache/');
define('DIR_DOWNLOAD', '/home/xxxx/public_html/shop/download/');
define('DIR_LOGS', '/home/xxxx/public_html/shop/system/logs/');
I hope all that makes sense.Last edited by Jason; 22 Aug 2012 at @ 08.23.
-
22 Aug 2012 @ 08.15 Thanks Jason for your detailed reply. I did changes accordingly in the config files. But it didnt solve the issue. So at last, after spending many hours with this error I opted to install a fresh copy.



1Likes
LinkBack URL
About LinkBacks











Hello every one
Hi, I am new on this forum and saying hello.