Newbie CGI Q

Keith Jones kmj9907 at cs.rit.edu
Fri Feb 21 12:39:42 EST 2003


Ian Pellew wrote:
> Hi;
> 
> I have the preverbial works from command line but NOT via apache/http.
> 
> The basics work OK on command line and via httpd (Solaris 8)
> The moment I "import cgi" I get the "Internal Server Error"
> The cgi with import cgi is OK on the command line.
> 
> The python_2_1 lib chown & chmod seem OK (same as "import os" that works.)
> 
> Suggestions please.
> 
> Regards
> Ian

I can't be of tremendous help, but I suggest you try wrapping your code 
in a try: catch block, and printing out the message error you get. Also, 
make sure you print out the context type. You say you're a newbie, but 
you may very well be more experienced with CGI than me. In my 
experience, you always get an internal error if the program exits before 
it prints out the content-type.





More information about the Python-list mailing list