[Zope-dev] pcgi problems

Quinn Dunkan quinn@challenge.calarts.edu
Mon, 15 Mar 1999 16:08:38 -0800


A while back I mentioned some intermittant problems with pcgi under irix, and
someone else mentioned the same sort of thing.  (the error is
'pcgi-wrapper: Error 0  (116) unable to connect, fd=3')  I was wondering if
the DC guys knew about this, or were interested in it, or have verified its
existence or cause?

On the subject of pcgi, the pcgi-wrapper syntax seems rather clunky (written,
no doubt, with a single zope process, rather than a bunch of 'normal' cgi
processes, in mind).  It requires absolute paths for everything, and whenever
you move one or create a new one it's sort of a pain.  Suppose I have:

#!/usr/local/apache/published/pcgi-wrapper

PCGI_NAME=spam
PCGI_MODULE_PATH=/usr/local/apache/published/spam.py
PCGI_PID_FILE=/usr/local/apache/pcgi-data/spam.pid
PCGI_ERROR_LOG=/usr/local/apache/pcgi-data/spam.log
PCGI_SOCKET_FILE=/usr/local/apache/pcgi-data/spam.socket
PCGI_DISPLAY_ERRORS=y

PCGI_PUBLISHER=/usr/local/apache/published/pcgi_publisher.py
PCGI_EXE=/usr/local/bin/python

It would be nice to be able to shorten this to:
#!/usr/local/apache/published/pcgi-wrapper
PCGI_MODULE_PATH=../published/spam.py
PCGI_DATA_DIR=../published/pcgi-data

and have pcgi-wrapper intuit the rest of the values for me (provided that I
stick pcgi_publisher.py in pcgi-data).  What are the problems with this
scheme?

The second problem is the pcgi-data directory.  Since pcgi processes are run
as the httpd user (or none or whataver), that user needs write access to
pcgi-data.  The only solutions I see are either to make pcgi-data 775 and put
it in the httpd group, or make it 777, which is the only option for normal
users.  I'm not too keen on the idea of 777 directories, but I don't see any
way around it besides apache's suEXEC (which is plastered with Big Fat
Warnings).  Anyone else thought about this problem?

One good solution I can think of is mod_pcgi.  Is someone actually working on
that (or planning on working on that), or are people just assuming surely
someone will write it eventually?

thanks!