Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

mysql_connect issue on xampp and opencart

Posted on 2016-08-09
3
Medium Priority
?
284 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 111

Accepted Solution

by:
Ray Paseur earned 2000 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 84

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
The viewer will learn how to count occurrences of each item in an array.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

610 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