CGI problem

Jacek Artymiak artymiak at safenet.pl
Fri Jan 7 16:39:35 EST 2000


sp00fD wrote:
> 
> I'm creating a CGI program, and I keep getting an error from apache:
> 
> "(8)Exec format error exec of /usr/local/apache/htdocs/...
> Premature end of script headers: /usr/local/apache/htdocs/..
> 
> I've put the print "Content-type: text/html\n" (with anywhere from 0 to
> 8 newlines after it) in there.
> 
> What am I doing wrong?

Try this first, then add your own bells & whistles

#! /usr/local/bin/python

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

<html>

        <head>

        <meta http-equiv="content-type" content="text/html">

        <title>Hello</title>

        </head>

        <body>

		<h1>Hello!</h1>

	<body>

</html>

'''


 

Jacek Artymiak

-------------------------------------------------------------------
 See how many people have registered at the Python Users Counter!
http://www.wszechnica.safenet.pl/cgi-bin/checkpythonuserscounter.py
-------------------------------------------------------------------
    Autor/Dziennikarz/Konsultant - Author/Journalist/Consultant
       artymiak at safenet.pl, http://www.wszechnica.safenet.pl
co-author:  StarOffice for Linux Bible (IDG Books Worldwide, Inc.)
http://www.amazon.com/exec.obidos/ASIN/0764533630/polskawszechnica
-------------------------------------------------------------------



More information about the Python-list mailing list