我嘗試了所有在互聯網上的解決方案,但仍然無法解決它。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