Categories

Featured templates

OpenCart 1.5.x Troubleshooter. How to get rid of the ‘Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future’ message

Alain Johns February 20, 2017
Rating: 5.0/5. From 2 votes.
Please wait...

With this tutorial you will learn how to deal with ‘Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future’ error after Opencart 1.5.x theme installation.

OpenCart_15x_Troubleshooter_How_to_get_rid_of_the_Deprecated_mys

We strongly recommend that you backup the files before editing!

In order to resolve this issue you need to change three things:

  1. Download this archive.

  2. Find the config.php file, located in the root directory of your OpenCart installation.

  3. Find the config.php file, located in the admin folder.

If you have the built-in code editor on your cPanel, feel free to use it.

  1. After you have downloaded archive mentioned in the first step you need to extract the files from it. You can check these links to learn how to do it for Windows and Mac. After you have done so, please, upload all the content of the Uploads folder to your OpenCart root folder.

  2. Now, when the files has been transferred, you need to go to your cPanel/FTP and locate the config.php file. Download it to your computer and edit it with any code editor convenient (Notepad++, Sublime, Adobe Dreamweaver).

    Locate the approximately 21st line define(‘DB_DRIVER’, ‘mysql’); and change it to the following: define(‘DB_DRIVER’, ‘mysqliz’);. Save the changes and upload it back to the root directory, make sure to overwrite the existing config.php file.

  3. Then you will need to perform same procedure in the config.php file in the admin folder. Please, go to admin folder and download config.php file. Open it with the same code editor you edited the previous file and locate approximately 24th define(‘DB_DRIVER’, ‘mysql’);. Then change it so it looks like this: define(‘DB_DRIVER’, ‘mysqliz’);. Save the changes and upload the file to the admin folder and make sure the existing file is replaced.

  4. After the file modifications are completed, please, clear the browsers cache. You will see that your site is working properly now.

    Feel free to check the detailed video tutorial below:

    OpenCart 1.5.x Troubleshooter. How to get rid of the ‘Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future’ message

    Also, take a look at the collection of our premium OpenCart templates.

Best OpenCart Themes
This entry was posted in OpenCart Tutorials and tagged deprecated, mysql extension, opencart, troubleshooter. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket