Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Supress MySQL Errors

How can I do it?

6:26 am on Mar 7, 2011 (gmt 0)

Junior Member

5+ Year Member

joined:July 13, 2010
votes: 0

[06-Mar-2011 02:35:47] PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: User [myusername] already has more than 'max_user_connections' active connections in /home/site/public_html/script.php on line 23

..gives WAY too much info! There is no reason a visitor needs to know all of that. Can I supress this message to something concise like "Our site is too busy to process this request. Check back later."?

If so, where/how could I do it?
3:11 pm on Mar 7, 2011 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 30, 2002
votes: 22

You can use @ if you want the script to continue or die() if it should terminate

Error Control Operators [php.net]

So you could have mysql_connect('host','user','pass') or die("Our site is too busy to process this request. Check back later.");