Tools and Techniques for Debugging Your Program Code

If you’ve gotten past all the standard problems people run into with CGI scripts and your script still isn’t working properly, you have to start searching for bugs within your code. This can be a much tougher job than dealing with all the common problems mentioned previously.

Basically, errors within programs come in two flavors—syntax errors and runtime errors. Syntax errors crop up when you use your programming language of choice improperly. If you leave out a required semicolon or use elseif instead of elsif, your program will not compile, or if it’s an interpreted language, it won’t execute all the way through. Runtime errors occur when all the syntax in your program is correct, but your ...

Get Sams Teach Yourself CGI in 24 Hours, 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.