homepage Welcome to WebmasterWorld Guest from 23.22.59.252
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
Supress MySQL Errors
How can I do it?
brokaddr



 
Msg#: 4277686 posted 6:26 am on Mar 7, 2011 (gmt 0)

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

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



 
Msg#: 4277686 posted 3:11 pm on Mar 7, 2011 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved