0

Guys i am having errors in my opencart website, but actually the problem is that this error also displays my database login and password. How can i fix this problem.

The error raised is like

Fatal error: Uncaught exception "ErrorException" with message "Error: Could not make a database link (1040) Too many connections" in /home/*******/public_html/system/database/mysqli.php:9 Stack trace: #0 /home//*******//public_html/vqmod/vqcache/vq2-system_library_db.php(13): DBMySQLi->__construct("localhost", "/*******/", "/*******/", "*******") #1 /home/******/public_html/index.php(46): DB->__construct("mysqli", "localhost", "/*******/", "/*******/", "/*******/") #2 {main} thrown in /home/*******/public_html/system/database/mysqli.php on line 9

OpenCart Version 1.5.6.1

Rafayel
  • 53
  • 1
  • 2
  • 8

1 Answers1

1

To address the most pressing issue: in production environments you should turn off error reporting.

There are some configuration settings you need to look into:

error_reporting: http://php.net/manual/en/function.error-reporting.php

display_errors: http://php.net/manual/en/errorfunc.configuration.php#ini.display-errors

For safety's sake, you should probably change your database password as well. Even if no one has seen it, it's not worth the risk.

There are numerous questions on SO about the too many connections issue. Here's one quite well upvoted answer: php, mysql - Too many connections to database error

Community
  • 1
  • 1
bcmcfc
  • 25,966
  • 29
  • 109
  • 181
  • And then just ignore the error? – idmean Sep 21 '14 at 08:02
  • @wumm primary issue: stop your production DB password being visible. As for too many connections, I am getting to that but it has also been addressed in the comments above. Hardly worthy of a downvote, it answers an aspect of the question. – bcmcfc Sep 21 '14 at 08:03