我尝试了所有在互联网上的解决方案,但仍然无法解决它。Opencart禁用Mysql/Php错误显示
Problem- Opencart的显示PHP/MySQL的误差(其也示出了用于连接到MySQL密码)
当Opencart的面向连接MySQL数据库或由于过多的连接PHP的任何问题是无法连接到数据库时,以下列格式显示错误。
Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'indiaran_admin'@'localhost' (using password: YES) in /home3/indiaran/public_html/system/database/mysqli.php on line 6
Fatal error: Uncaught exception 'ErrorException' with message 'Error: Could not make a database link' in /home3/indiaran/public_html/system/database/mysqli.php:9 Stack trace:#0 /home3/indiaran/public_html/vqmod/vqcache/vq2-system_library_db.php(13): DBMySQLi->__construct('localhost', 'indiaran_admin', 'PASSWORD', 'indiaran_db') #1 /home3/indiaran/public_html/index.php(44): DB->__construct('mysqli', 'localhost', 'indiaran_admin', 'PASSWORD', 'indiaran_db') #2 {main} thrown in /home3/indiaran/public_html/system/database/mysqli.php on line 9
预期的解决方案: - (任何将尽)
- Opencart的停止显示任何错误MySQL的/ PHP
- 误差不显示我的数据库ID和密码显示。
- 其停止显示所有的错误(包括mysqli的连接错误)
解决方案没有尝试过任何解决方案: -
首先
php.ini has
display_errors = Off;
error_reporting = 0;
htaccess has
php_value error_reporting 0
二
There is a setting within the OpenCart dashboard that allows you to turn on (or off) error reporting and logging.
Log into your dashboard
In the menu, go to "System" and select "Settings"
In the list of stores, click "Edit" for your store
Click the "Server" tab.
Scroll down, and there's two settings:
a. Log Errors - set this as desired
b. Display Errors - set this to "No"
三
Commenting Out set_error_handler('error_handler'); in index.php
四
Using Php Try-Catch Phrase, which i dont know exactly how to use in opencart.
希望我能解释一下,有人将能够helpme。
PS: - 我的网站托管Hostgator作为共享主机。
链接到无法解决我的问题的类似问题。
http://stackoverflow.com/questions/16935473/cant-disable-error-reporting-in-opencart-php
http://stackoverflow.com/questions/5040048/php-mysql-too-many-connections-to-database-error
http://stackoverflow.com/questions/25957024/warning-mysqlimysqli-mysqli-mysqli-08004-1040-too-many-connections-in
http://stackoverflow.com/questions/28591394/mysqli-connect-error-shows-password/28591455#28591455
什么是再次询问你是否已经接受你在这里关于同一主题的问题的答案的原因:HTTPS:/ /stackoverflow.com/questions/28591394/mysqli-connect-error-shows-password ??? – shadyyx 2015-02-23 13:49:12
我接受了这个答案,因为这帮助我解决了问题,但在opencart方面却没有解决问题,因为当涉及到opencart时似乎没有任何工作: – 2015-02-24 05:55:36