node247





11.2.9 Common problems and solutions
















Python Library Reference




Previous: 11.2.8 Debugging CGI scripts
Up: 11.2 cgi
Next: 11.3 urllib




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.








Python Library Reference




Previous: 11.2.8 Debugging CGI scripts
Up: 11.2 cgi
Next: 11.3 urllib



See About this document... for information on suggesting changes.





Wyszukiwarka

Podobne podstrony:
node245 T2YQJZD6LDQ6LP5OYUC3OHQJMT5QYEUMQNSNPTI
node245
node243
node242 7L22GLKYOY7WCD2ENRGH2MBHLMAUTJL2GTKKYNY
node246 YIF4WCYAY6SJS2OLKTPEMD6TGPZD4BLGOW43G3A
node24 PDHWHKXXAJCE53SGAZZQAGL4RLNJ7ZXWLGOY4QY
node24
node24 3ZDS5WHDJGYZQJTUOOHV6YJOOXTC2GUWSJC775I
node24
node244
node243 YS2T6SICTFF6CFMWRO7X5VPFRR7EJ4VCN3TKXFY
node24 2PNVCNM2PFRUZA3ENONWT4NSN4DPLHTMPZ3FH7Y
node241
node244 D3H4Q5QNKWCUAFHHJWADTRR7OS7G5JGYHSPAIMQ
node249 7JYBNHKY3DEZ42ROO3VGHKZUJVB2IRUD4MHHCUY
node24 1
node248 C33U2NRXWJ5BBSGXFIODC6MPK44O246Y7WN2G7Y

więcej podobnych podstron