Cgi scripts in apache not working
- From: "David" <Neruocomp@xxxxxxxxx>
- Date: 28 Jul 2005 10:27:59 -0700
I've looked all over the place for an answer, and the only one I can
find doesn't mean anything to me. The end of line issue with writting
it in Windows and then uploading it doesn't help me since I'm doing
this all from Linux. I've been trying to get python cgi scripts to
work, and I always end up with a "Premature end of script headers" in
the error log.
The scripts are executable by all and my httpd.conf seems fine. I also
tested it out in /var/www/cgi-bin/ and there it seems to work fine.
test2.py:
#!/usr/bin/python
print "Content-type: text/html\n\n"
print """<html>
<head></head>
<body>
<h1>Hello World</h1>
</body>
</html>"""
httpd.conf:
<Directory "/home/*/public_html/cgi/"> << Tried it with "" and no ""
Options ExecCGI << Tried with "Options +ExecCGI"
AddHandler cgi-script .cgi .py << Tried with "SetHandler
cgi-script", but still no go
</Directory>
error_log:
[Thu Jul 28 11:44:53 2005] [error] [client xxx.xxx.xxx.xxx] Premature
end of script headers: test2.py
suexec.log:
[2005-07-28 11:44:53]: uid: (500/davidnoriega) gid: (500/500) cmd:
test2.py
[2005-07-28 11:44:53]: directory is writable by others:
(/home/davidnoriega/public_html/cgi)
.
- Follow-Ups:
- Re: Cgi scripts in apache not working
- From: Bruno Desthuilliers
- Re: Cgi scripts in apache not working
- From: Paul Boddie
- Re: Cgi scripts in apache not working
- Prev by Date: Re: Graphics files & Python
- Next by Date: Adding code and methods to a class dynamically
- Previous by thread: ANN: Python training, 2005 Aug 29-31, San Francisco
- Next by thread: Re: Cgi scripts in apache not working
- Index(es):
Relevant Pages
|