{"id":79228,"date":"2017-02-20T10:50:41","date_gmt":"2017-02-20T15:50:41","guid":{"rendered":"https:\/\/www.templatemonster.com\/help\/?p=79228"},"modified":"2017-03-31T02:59:40","modified_gmt":"2017-03-31T06:59:40","slug":"opencart-1-5-x-troubleshooter-get-rid-deprecated-mysql_connect-mysql-extension-deprecated-will-removed-future-message","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/opencart-1-5-x-troubleshooter-get-rid-deprecated-mysql_connect-mysql-extension-deprecated-will-removed-future-message.html","title":{"rendered":"OpenCart 1.5.x Troubleshooter. How to get rid of the &#8216;Deprecated: mysql_connect():  The mysql extension is deprecated and will be removed in the future&#8217; message"},"content":{"rendered":"<p>With this tutorial you will learn how to deal with <strong>&#8216;Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future&#8217;<\/strong> error after Opencart 1.5.x theme installation.<\/p>\r\n\r\n <div class=\"video-container\">\r\n\t<iframe src=\"https:\/\/www.youtube.com\/embed\/20OAYJX3NdQ\"><\/iframe>\r\n<\/div>\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2017\/02\/OpenCart_15x_Troubleshooter_How_to_get_rid_of_the_Deprecated_mys.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2017\/02\/OpenCart_15x_Troubleshooter_How_to_get_rid_of_the_Deprecated_mys.jpg\" alt=\"OpenCart_15x_Troubleshooter_How_to_get_rid_of_the_Deprecated_mys\" width=\"1677\" height=\"138\" class=\"alignnone size-full wp-image-79229\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/OpenCart_15x_Troubleshooter_How_to_get_rid_of_the_Deprecated_mys.jpg 1677w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/OpenCart_15x_Troubleshooter_How_to_get_rid_of_the_Deprecated_mys-150x12.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/OpenCart_15x_Troubleshooter_How_to_get_rid_of_the_Deprecated_mys-300x25.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/OpenCart_15x_Troubleshooter_How_to_get_rid_of_the_Deprecated_mys-768x63.jpg 768w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/OpenCart_15x_Troubleshooter_How_to_get_rid_of_the_Deprecated_mys-1024x84.jpg 1024w\" sizes=\"(max-width: 1677px) 100vw, 1677px\" \/><\/a>\r\n<p class=\"attention\">We strongly recommend that you backup the files before editing!<\/p>\r\n\r\n<p>In order to resolve this issue you need to change three things:<\/p>\r\n\r\n<ol>\r\n\t<li><p>Download <a href=\"https:\/\/www.opencart.com\/index.php?route=marketplace\/download\/download&#038;member-token=6Q8sV9TOR9uA0U0O7Ytvdqm5bxsw7nUI&#038;extension_download_id=1008523\">this archive<\/a>.<\/p><\/li>\r\n\t<li><p>Find the <strong>config.php file<\/strong>, located in the root directory of your OpenCart installation.<\/p><\/li>\r\n\t<li><p>Find the <strong>config.php file<\/strong>, located in the <strong>admin<\/strong> folder.<\/p><\/li>\r\n<\/ol>\r\n\r\n<p>If you have the built-in code editor on your cPanel, feel free to use it.<\/p>\r\n\r\n<ol>\r\n\t<li>\r\n\t\t<p>After you have downloaded archive mentioned in the <strong>first step<\/strong> you need to extract the files from it. You can check these links to learn how to do it for <a target=\"_blank\" href=\"\/help\/how-to-extract-archived-files-windows-os.html\">Windows<\/a> and <a href=\"\/help\/extract-archived-files-mac-os.html\" target=\"_blank\">Mac<\/a>. After you have done so, please, upload all the content of the <strong>Uploads<\/strong> folder to your OpenCart root folder.<\/p>\r\n\t<\/li>\r\n\t<li>\r\n\t\t<p>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).<\/p>\r\n\t\t<p>Locate the approximately 21st line <strong>define(&#8216;DB_DRIVER&#8217;, &#8216;mysql&#8217;);<\/strong> and change it to the following: <strong>define(&#8216;DB_DRIVER&#8217;, &#8216;mysqliz&#8217;);<\/strong>. Save the changes and upload it back to the root directory, make sure to overwrite the existing <strong>config.php<\/strong> file.<\/p>\r\n\t<\/li>\r\n\t<li>\r\n\t\t<p>Then you will need to perform same procedure in the <strong>config.php<\/strong> file in the admin folder. Please, go to <strong>admin<\/strong> folder and download <strong>config.php<\/strong> file. Open it with the same code editor you edited the previous file and locate approximately 24th <strong>define(&#8216;DB_DRIVER&#8217;, &#8216;mysql&#8217;);<\/strong>. Then change it so it looks like this: <strong>define(&#8216;DB_DRIVER&#8217;, &#8216;mysqliz&#8217;);<\/strong>. Save the changes and upload the file to the <strong>admin<\/strong> folder and make sure the existing file is replaced.<\/p>\r\n\t<\/li>\r\n<\/ul>\r\n\r\n<p>After the file modifications are completed, please, clear the browsers cache. You will see that your site is working properly now.<\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<a href=\"http:\/\/www.youtube.com\/watch?v=20OAYJX3NdQ?width=1280&amp;height=720\" rel=\"prettyPhoto\">OpenCart 1.5.x Troubleshooter. How to get rid of the &#8216;Deprecated: mysql_connect():  The mysql extension is deprecated and will be removed in the future&#8217; message<\/a>\r\n<p>Also, take a look at the collection of our <a href=\"https:\/\/www.templatemonster.com\/opencart-templates.php\" target=\"_blank\">premium OpenCart templates<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>With this tutorial you will learn how to deal with <strong>&#8216;Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future&#8217;<\/strong> error after Opencart 1.5.x theme installation.<\/p>\n","protected":false},"author":118,"featured_media":79230,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1156],"tags":[1893,2561,1157,785],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/79228"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/118"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=79228"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/79228\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/79230"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=79228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=79228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=79228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}