Welcome to WebmasterWorld Guest from 54.147.20.131

Forum Moderators: open

Message Too Old, No Replies

Supress MySQL Errors

How can I do it?

     

brokaddr

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

5+ Year Member



Error:
[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?

brotherhood of LAN

3:11 pm on Mar 7, 2011 (gmt 0)

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



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.");
 

Featured Threads

Hot Threads This Week

Hot Threads This Month