-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Learning PHP Data Objects
By :
Now that we have built our first application that uses PDO, we will take a closer look at an important aspect of user-friendly web applications—error handling. Not only does it inform the user about an error condition, it also limits the damage if an error is not detected when it occurred.
Most web applications have rather simple error handling strategy. When an error occurs, the script terminates and an error page is presented. The error should be logged in the error log, and the developers or maintainers should check the logs periodically. The most common sources of errors in database-driven web applications are the following:
Server software failure or overload such as the famous "too many connections" error
Inappropriate configuration of the application, which may happen when we use an incorrect connection string, a rather common mistake when an application is moved from one host to another
Improper validation of user input, which may lead to malformed SQL and...
Change the font size
Change margin width
Change background colour