[PEAK] fcgi required for trivial_web and trivial_cgi?
Phillip J. Eby
pje at telecommunity.com
Mon Nov 24 14:49:32 EST 2003
At 08:03 AM 11/24/03 -0500, Victor Ng wrote:
>I'm getting this error in my Apache error logs when I try to run the
>trivial.cgi script:
>
> Unexpected error in reactor.run():
> Traceback (most recent call last):
> File
>"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>python2.3/site-packages/peak/running/scheduler.py", line 217, in run
> self.iterate()
> File
>"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>python2.3/site-packages/peak/running/scheduler.py", line 279, in
>iterate for reader in r: reader.doRead()
> File
>"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>python2.3/site-packages/peak/running/commands.py", line 802, in doRead
> i,o,e,env = self.accept()
> fcgiapp.error: 22
>
>Any ideas?
>
>vic
It should only do this if CGICommand.isFastCGI() returns true. That method
only returns true if 'fcgiapp' is installed, *and* calling
'socket.fromfd()' on sys.stdin.fileno() results in a socket whose
'getsockname()' method works without raising an error.
In theory, the latter should only happen if stdin is a listenable socket,
which is not normally the case for normal CGI. (Usually, stdin is a pipe
for CGI.)
What machine/OS are you running on? Is it by any chance a Mac?
>On 21-Nov-03, at 6:54 PM, Phillip J. Eby wrote:
>
>>At 06:08 PM 11/21/03 -0500, Victor Ng wrote:
>>
>>>On a different note - do the trivial_web and trivial_cgi examples
>>>required fcgi?
>>
>>They should not. The 'peak.running.commands.CGICommand' wrapper can
>>distinguish whether it is being run via CGI or FastCGI, and it then
>>behaves appropriately.
More information about the PEAK
mailing list