On Wed, Mar 20, 2002 at 05:00:09AM -0500, Neal M. Holtz wrote: > I've found something, but don't know what it means, yet: > > in fcgi.py there is this: > > def _startup(): > . . . lines omitted for brevity > try: > s=socket.fromfd(sys.stdin.fileno(), socket.AF_INET, > socket.SOCK_STREAM) > s.getpeername() > except socket.error, (err, errmsg): > if err!=errno.ENOTCONN: # must be a non-fastCGI environment > _isFCGI = 0 > return > > The s.getpeername() call raises an exception, which causes > _isFCGI to be set to 0. Why does this happen? Try changing socket.error to something like "foobar" (i.e. an exception that will never get raised). Run it again and see what the traceback says. Perhaps the socket is not connected but the errno is something other than ENOTCONN. Also, since you know the script is running under FCGI you could comment out the s.getpeername() line and see if that works. Neil