home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / python / pyhtmldoc / c / common_pro < prev    next >
Encoding:
Text File  |  1996-11-14  |  1.4 KB  |  32 lines

  1. <TITLE>Common problems and solutions -- Python library reference</TITLE>
  2. Prev: <A HREF="../d/debugging_cgi_scripts" TYPE="Prev">Debugging CGI scripts</A>  
  3. Up: <A HREF="../c/cgi" TYPE="Up">cgi</A>  
  4. Top: <A HREF="../t/top" TYPE="Top">Top</A>  
  5. <H2>10.1.9. Common problems and solutions</H2>
  6. <UL>
  7. <LI>•  Most HTTP servers buffer the output from CGI scripts until the
  8. script is completed.  This means that it is not possible to display a
  9. progress report on the client's display while the script is running.
  10. <P>
  11. <LI>•  Check the installation instructions above.
  12. <P>
  13. <LI>•  Check the HTTP server's log files.  (<CODE>tail -f logfile</CODE> in a separate
  14. window may be useful!)
  15. <P>
  16. <LI>•  Always check a script for syntax errors first, by doing something
  17. like <CODE>python script.py</CODE>.
  18. <P>
  19. <LI>•  When using any of the debugging techniques, don't forget to add
  20. <CODE>import sys</CODE> to the top of the script.
  21. <P>
  22. <LI>•  When invoking external programs, make sure they can be found.
  23. Usually, this means using absolute path names -- <CODE>$PATH</CODE> is usually not
  24. set to a very useful value in a CGI script.
  25. <P>
  26. <LI>•  When reading or writing external files, make sure they can be read
  27. or written by every user on the system.
  28. <P>
  29. <LI>•  Don't try to give a CGI script a set-uid mode.  This doesn't work on
  30. most systems, and is a security liability as well.
  31. </UL>
  32.