Solved

mysql_connect issue on xampp and opencart

Posted on 2016-08-09
3
148 Views
Last Modified: 2016-08-17
I'm using OpenCart 1.5.4 to mimic a live website on my computer.  I'm using Xampp.
I'm getting this error:

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in G:\xampp\htdocs\steveshopoc\system\database\mysql.php on line 6

Some people have suggested that people with this issue should add this line to PHP.INI to get rid of it:
display_errors = Off

I've added that to multiple php.ini files in OpenCart and to Xampp's php.ini file, but i still get the error (after restarting the server and reopening the browser)

But even if it were hiding the error, should the error be happening?

Also, one site mentioned changing the line in OpenCart:
define('DB_DRIVER', 'mysql');
to
define('DB_DRIVER', 'mysqli');

when i do that, I get this error:
Error: Could not load database file mysqli!

Which makes me think the driver isn't installed...  but I can't seem to find it.

Any suggestions on what I can do to resolve this issue?

Thank you!

Steve
0
Comment
Question by:slightlyoff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 110

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 41749153
This is a very common issue.  This article explains it all, and shows exactly what must be done to remove the problems.
https://www.experts-exchange.com/articles/11177/PHP-MySQL-Deprecated-as-of-PHP-5-5-0.html

PHP / MySQLi  installation instructions:
http://php.net/manual/en/mysqli.installation.php
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 41749402
1.  Never turn error reporting off.  How else will you know what to fix?  I leave it on even in 'production' because sometimes things change so people can tell me if there are problems.

2.  If your web host's current version of PHP still uses / supports 'mysql' instead of 'mysqli', you can be almost guaranteed that one day they will upgrade and your site will stop working.
1
 
LVL 1

Author Comment

by:slightlyoff
ID: 41759507
Thank you for your help.  Sorry for the delay in responding.  I haven't been back to the project since posting.
0

Featured Post

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question