homepage Welcome to WebmasterWorld Guest from 54.211.47.170
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

    
Supress MySQL Errors
How can I do it?
brokaddr




msg:4277688
 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




msg:4277801
 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