Opencart禁用Mysql/Php错误显示

Opencart禁用Mysql/Php错误显示,php,mysql,sql,mysqli,opencart,Php,Mysql,Sql,Mysqli,Opencart,我在互联网上尝试了所有的解决方案,但仍然无法解决 问题-Opencart显示Php/MySql错误,其中还显示用于连接MySql的密码 当Opencart在连接MySql数据库时遇到任何问题,或者由于连接太多,php无法连接到数据库时,将以以下格式显示错误 警告:mysqli::mysqli:28000/1045:拒绝用户访问 “indiaran_admin”@“localhost”在中使用密码:YES /第6行的home3/indiaran/public_html/system/databas

我在互联网上尝试了所有的解决方案,但仍然无法解决

问题-Opencart显示Php/MySql错误,其中还显示用于连接MySql的密码

当Opencart在连接MySql数据库时遇到任何问题,或者由于连接太多,php无法连接到数据库时,将以以下格式显示错误

警告:mysqli::mysqli:28000/1045:拒绝用户访问 “indiaran_admin”@“localhost”在中使用密码:YES /第6行的home3/indiaran/public_html/system/database/mysqli.php

致命错误:未捕获异常“ErrorException”,消息为“error: 无法在中创建数据库链接 /home3/indiaran/public_html/system/database/mysqli.php:9堆栈跟踪:0/home3/indiaran/public_html/vqmod/vqcache/vq2-system_library\u db.php13: DBMySQLi->\u构造'localhost'、'indiaran\u admin'、'PASSWORD', “indiaran_db”1/home3/indiaran/public_html/index.php44: DB->构造“mysqli”、“localhost”、“indiaran\u admin”, “密码”,“indiaran_db”2{main}被抛出 /第9行的home3/indiaran/public_html/system/database/mysqli.php

预期解决方案:-任何都可以

Opencart停止显示任何错误Mysql/php 显示错误,但不显示我的数据库id和密码。 任何停止显示所有错误(包括mysqli connect错误)的解决方案 尝试过的解决方案:-

首先

第二

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.
希望我能解释我自己,有人能帮助我

私人秘书:- 我的网站以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
您的第一个解决方案是正确的,应该能够完成所需的工作,但根据我的经验,在php.ini中所做的任何更改都会在您99%的时间重新启动服务器后生效

我知道您当前使用的是共享服务器,您不可能重新启动服务器,因此为了解决此问题,我在与Dreamhost Web Hosting Provider面对类似问题时使用了PHP Rintime配置PHPRC

您还可以联系您的主机提供商,了解如何实现PHPRC。如果您想了解如何在Dreamhost中执行此操作,请访问以下链接:


再次询问您是否已经接受了关于同一主题的问题的答案的原因是什么:???我接受了这个答案,因为它帮助我解决了所有问题,但在opencart方面却没有,因为在opencart方面似乎什么都不起作用:/
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