Newbie CGI Q

Wayne Pierce wayne at mishre.com
Fri Feb 21 18:39:24 EST 2003


Keith Jones <kmj9907 at cs.rit.edu> wrote in message news:<3e566421$1 at buckaroo.cs.rit.edu>...
> 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.

Will you post the code that you are having problems with, at least the
main parts of it.  Your script will need to print out "Content-type:
text/html\n\n" in some form.  You have to have the two empty lines
after the Content-type.

W-




More information about the Python-list mailing list