Hello Word in CGI

Olivier Dagenais olivierS.dagenaisP at canadaA.comM
Wed Jul 5 22:05:51 EDT 2000


> print "<P>This is San Diego.<br>Localtime is", ctime( time() ) + ".<P>"

Are you sure you can concatenate a string to a time?

Also,

> print "Content-type: text/html"
> print

There's something peculiar about this part.  You need an EXACT number of
linefeeds, otherwise nothing works.  I can't remember if it's one or two,
though...

--
----------------------------------------------------------------------
Olivier A. Dagenais - Carleton University - Computer Science III


"Curtis Jensen" <cjensen at bioeng.ucsd.edu> wrote in message
news:3963C29E.76211EB7 at bioeng.ucsd.edu...
> We get this error in our server log:
> Wed Jul  5 16:12:52 2000] [error] [client 132.239.236.47] Premature end
> of script headers:
> /usr/local/httpd/cgi-bin/test_jmsun/cont_forms/helloworld.py
>
>
> The browser gives us this error:
> Internal Server Error
>
> The server encountered an internal error or misconfiguration and was
> unable to complete your request.
>
> Please contact the server administrator, webmaster at bioeng.ucsd.edu and
> inform them of the time the error occurred, and
> anything you might have done that may have caused the error.
>
> More information about this error may be available in the server error
> log.
>
>
> Apache/1.3.6 Server at cmrg.ucsd.edu Port 80
>
>
>
> Using this script from:
> http://www.ping.be/sabine-appelmans/home/python/index.html
>
> #!/usr/local/Python/bin/python
> #
> # helloworld.py
> #
>
> from time import *
>
> print "Content-type: text/html"
> print
>
> print "<HTML>"
>
> print "<Head>"
> print "<Title>Hello World</Title>"
> print "</Head>"
>
> print "<Body>"
> print "<H1>Hello World !</H1>"
> print "<hr>"
>
> print "<P>This is San Diego.<br>Localtime is", ctime( time() ) + ".<P>"
>
> print "</Body>"
> print "</HTML>"
>
>
>
> Any ideas why?
>
> --
> Curtis Jensen
> cjensen at bioeng.ucsd.edu
> http://www-bioeng.ucsd.edu/~cjensen/
> FAX (425) 740-1451





More information about the Python-list mailing list