PHP Debugging Techniques
When it comes to debugging, what experience teaches you most is the causes of certain types of errors. Knowing this makes fixing the error much, much faster. To shorten the chase, Table 6.3 lists the likely reasons for the most common PHP errors.
Common PHP Errors | |
---|---|
Error | Likely Cause |
Blank Page | HTML problem, or PHP error and display_errors is off. |
Parse error | Missing semicolon; unbalanced curly braces, parentheses, or quotation marks; or use of an unescaped quotation mark in a string. |
Empty variable value | Forgot the initial $, misspelled or miscapitalized the variable name, inappropriate variable scope (with functions), ... |
Get PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.