?
Solved

mysql_connect issue on xampp and opencart

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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
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:
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

764 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