random1 Posted May 1, 2008 Share Posted May 1, 2008 I've notice that most PHP apps don't have a default behavior when: The database connection fails The server is unavailable What are the best ways to handle these situations? Should the user be redirected to a nicer version of a cannot connect page? Basically I want to know what is a logical response to these situations? Link to comment https://forums.phpfreaks.com/topic/103790-default-application-behaviour/ Share on other sites More sharing options...
Daniel0 Posted May 2, 2008 Share Posted May 2, 2008 It does have a default behavior. If you're using PDO it'll throw an exception, the other extensions will generate errors. You should hide both of those from the user. Just tell them an unexpected error occurred. Link to comment https://forums.phpfreaks.com/topic/103790-default-application-behaviour/#findComment-531830 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.