acook Posted June 20, 2007 Share Posted June 20, 2007 I have a page that queries a database. Well, often the DB goes down and the script returns the standard PHP timeout error: Fatal error: Maximum execution time of 60 seconds exceeded in blah on line 70 Is there any way to write a custom message into the page that will display something like: I'm sorry, the database is down right now. Quote Link to comment https://forums.phpfreaks.com/topic/56418-php-timeout-message/ Share on other sites More sharing options...
chigley Posted June 20, 2007 Share Posted June 20, 2007 <?php $conn = mysql_connect("localhost", "user", "pass"); if(!$conn) { die("I'm sorry, the database is down right now."); } // rest of code here ?> Use something like that? Quote Link to comment https://forums.phpfreaks.com/topic/56418-php-timeout-message/#findComment-278633 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.