Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How to change the databse connection fail warning message with custom message?

0 votes
406 views
asked Sep 16, 2012 in Q2A Core by Ashish Mahapatra

Some times my website shows databse connection fail message. Is there a way to replace that warning with custom message.

This is the warning message

Warning: mysql_connect() [function.mysql-connect]: Too many connections in /home/public_html/qa-include/qa-db.php on line 66

 

Could not establish database connection. Please check the username, password and hostname in the config file, and if necessary set up the appropriate MySQL user and privileges.

Custom message: No databse connection. Visit the website after sometime.

1 Answer

0 votes
answered Sep 25, 2012 by William Orellana
The warning it's not generated by Q2A script, but by PHP. There is nothing you can do. You should move to another hosting instead.
...