Warning: mysqli::mysqli() [mysqli.mysqli]: (08004/1040): Too many connections in OpenCart [duplicate]

放肆的年华 提交于 2019-12-24 21:07:13

问题


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


回答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



来源:https://stackoverflow.com/questions/25957024/warning-mysqlimysqli-mysqli-mysqli-08004-1040-too-many-connections-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!