home *** CD-ROM | disk | FTP | other *** search
- <TITLE>Common problems and solutions -- Python library reference</TITLE>
- Prev: <A HREF="../d/debugging_cgi_scripts" TYPE="Prev">Debugging CGI scripts</A>
- Up: <A HREF="../c/cgi" TYPE="Up">cgi</A>
- Top: <A HREF="../t/top" TYPE="Top">Top</A>
- <H2>10.1.9. Common problems and solutions</H2>
- <UL>
- <LI>• 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.
- <P>
- <LI>• Check the installation instructions above.
- <P>
- <LI>• Check the HTTP server's log files. (<CODE>tail -f logfile</CODE> in a separate
- window may be useful!)
- <P>
- <LI>• Always check a script for syntax errors first, by doing something
- like <CODE>python script.py</CODE>.
- <P>
- <LI>• When using any of the debugging techniques, don't forget to add
- <CODE>import sys</CODE> to the top of the script.
- <P>
- <LI>• When invoking external programs, make sure they can be found.
- Usually, this means using absolute path names -- <CODE>$PATH</CODE> is usually not
- set to a very useful value in a CGI script.
- <P>
- <LI>• When reading or writing external files, make sure they can be read
- or written by every user on the system.
- <P>
- <LI>• 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.
- </UL>
-