Deprecated: mysql_connect() error in Opencart 1.5.6.1
In my new xampp 1.8.3 installation, I installed Opencart 1.5.6.1 and received a deprecated warning message such as:
The quick way to resolve this issue is by making a small change to the config.php and admin/config.php files. In both these config.php files, look for the line
Modify the above line to
The new line will simply connect to the database from system/database/mysqli.php file.
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in ....\system\database\mysql.php on line 6
The quick way to resolve this issue is by making a small change to the config.php and admin/config.php files. In both these config.php files, look for the line
define('DB_DRIVER', 'mysql');
Modify the above line to
define('DB_DRIVER', 'mysqli');
The new line will simply connect to the database from system/database/mysqli.php file.
but file config.php and admin/config.php empty, i cannot replace define('DB_DRIVER', 'mysql'); show me how to fix
ReplyDeleteIf you have installed Opencart, I believe these files especially admin/config.php should not be empty. It puts all your database credentials there. Did you create database in your host control panel prior to installing Opencart. Maybe you can also try doing a site-wide search for "define('DB_DRIVER', 'mysql')" to see where exactly it has placed it.
Deletethanks for your help
ReplyDeletethanks for your help
ReplyDeletethanks my friend.
ReplyDeleteThanks!!
ReplyDeleteIt fixed the issue. Thanks.
ReplyDeleteHi there,
ReplyDeleteI know this is an old thread, but I now have the above issue with my site.
The problem I'm having is, my config file directory is empty, and I don't appear to have an admin/config file at all. I'm a bit of a novice so not 100% sure where to start looking, or how to resolve the issue :(
Still getting the issue at the top of my page, and I can't login to the admin panel to put the site into maintenance mode because of it.
ReplyDeleteI changed the config.php file for both public and admin to use mysqli as the DB driver, wat do?