[Pythonmac-SIG] Using Python for cgi
Brian Wichmann
brian.wichmann at totalise.co.uk
Tue May 1 12:06:44 CEST 2007
Thanks, David,
The position is:
On 1 May 2007, at 10:17, David Warde-Farley wrote:
> Chances are Apache isn't set up to handle a .py as an executable.
> Make sure you've got lines like
>
> AddHandler cgi-script .cgi
> AddHandler cgi-script .py
>
> in /etc/httpd/httpd.conf (you might have the first one but not the
> second, I can't remember what comes stock in OS X's apache configs)
Both were already done.
>
> Make sure the "LoadModule cgi_module ..." line is uncommented as
> well as the "AddModule mod_cgi.c" line (search for them).
Both already done.
>
> Once you're sure all this is in place, "sudo apachectl graceful" at
> a prompt.
This told me that the command passenv was not recognised as per
previous mail message. Hence
I deleted the two lines:
passenv PYTHONPATH
setenv PYTHONBUFFERED 1
(See http://mail.python.org/pipermail/pythonmac-sig/2002-December/
006954.html )
Unfortunately, I get the same response: the file cgitest.py is copied
to the browser window rather than being executed.
The error log gave:
Processing config directory: /private/etc/httpd/users/*.conf
[Tue May 1 10:55:07 2007] [notice] Apache/1.3.33 (Darwin) configured
-- resuming normal operations
[Tue May 1 10:55:07 2007] [notice] Accept mutex: flock (Default: flock)
(Nothing in the access log)
Brian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20070501/c4d1528c/attachment.htm
More information about the Pythonmac-SIG
mailing list