durusmail: quixote-users: [newbie] basic CGIHTTPServer support ?
[newbie] basic CGIHTTPServer support ?
[newbie] basic CGIHTTPServer support ?
2002-03-23
2002-03-25
2002-03-27
[newbie] basic CGIHTTPServer support ?
Greg Ward
2002-03-25
On 23 March 2002, richard offer said:
> Is there any obvious reson why the basic CGIHTTPServer doesn't work ?

Looks like an incompatibility between fcgi.py and CGIHTTPServer.py.  I
was able to replicate your error, and I remembered to look in
/tmp/quixote-demo-error.log to see why demo.cgi was crashing:

  Traceback (most recent call last):
    File "/local/home/gward/src/mems/quixote/demo/demo.cgi", line 21, in ?
      app.publish_cgi()
    File "/www/mxpython/quixote/publish.py", line 689, in publish_cgi
      f = fcgi.FCGI()
    File "/www/mxpython/quixote/fcgi.py", line 241, in __init__
      self.conn, addr=_sock.accept()
  socket.error: (22, 'Invalid argument')
  Exception exceptions.AttributeError: "FCGI instance has no attribute 'err'" in
> ignored

Ignore the second error -- it's a bug in fcgi.py.  The real problem is
the socket exception.  At line 241, _sock is a global defined in
_startup(); it's created by callin socket.fromfd() on sys.stdin.

There must be something different about the stdin that Apache passes to
CGI scripts and the stdin that CGIHTTPRequestHandler passes.  Hmmm.
Beats me.

        Greg
--
Greg Ward - software developer                gward@mems-exchange.org
MEMS Exchange                            http://www.mems-exchange.org


reply