## 11.2.9 Common problems and solutions

- Most HTTP servers buffer the output from CGI scripts until the script is completed. This means that it is not possible to display a progress report on the client's display while the script is running.

- Check the installation instructions above.

- Check the HTTP server's log files. ("`tail -f logfile`" in a separate window may be useful!)

- Always check a script for syntax errors first, by doing something like "`python script.py`".

- When using any of the debugging techniques, don't forget to add "`import sys`" to the top of the script.

- When invoking external programs, make sure they can be found. Usually, this means using absolute path names -- $PATH is usually not set to a very useful value in a CGI script.

- When reading or writing external files, make sure they can be read or written by every user on the system.

- Don't try to give a CGI script a set-uid mode. This doesn't work on most systems, and is a security liability as well.