[Zope] - newbie PCGI problems

Jeff Bauer jeffbauer@bigfoot.com
Tue, 8 Dec 1998 11:29:18 -0600


> Reading your "Sacrificial Virgin" email:  so on Solaris is it
> necessary to have the UNION_SEMUN macro in pcgi.h?
 
No, that email was mistakenly based on the pre-release.  The 
UNION_SEMUN problem was fixed prior to general release.

>> The Rewrite directives for Apache normally go in
>> httpd.conf.  Actually the Rewrite directives should only
>> affect authorization, so if you are denied access *after*
>> the user name and password dialog appears, everything
>> else with PCGI is probably working.

> Cool.  I added em, but it didn't seem to help much.  

They won't help much the first time.  You've got to
stare at them long and hard and squint your eyes up
funny.  Seriously, the main thing is to check your
path settings and that you're using the absolute path.

[ Peter performs invasive surgery on Publisher.py ... ]

> Okay, changed that back... actually, to be totally safe, 
> I scrubbed everything and reinstalled Zope 
> ...
> and tried again-- got the authentication screen.  Still 
> can't authenticate.

>> The pcgi_publisher.py module is actually trying to import
>> publish_module from ZPublisher.

> Yea-- Can't seem to get around this...
> <cringe>
> Potential stupid question:  Shouldn't there be a ZPublisher 
> module somewhere?
> </cringe>

Not a stupid question at all, it's using the new import
package mechanism in Python 1.5:

Zope-1.9b1-src/
    lib/
        python/
            ZPublisher/
                __init__.py  "from Publish import publish_module"
                Publish.py
                    def publish_module():
                        ...
                        
> NOW, the ../cgi-bin/pcgifile.py?filename=.../Zope.cgi thing 
> gives me

> PCGI info file: /export/home/pulintz/Zope-1.9b1-src/Zope.cgi
> PCGI wrapper:   /export/home/pulintz/Zope-1.9b1-src/pcgi/pcgi-wrapper
> PCGI_SOCKET_FILE write permission error:
> /export/home/pulintz/Zope-1.9b1-src/var/pcgi.soc
> status: FAILURE

Hmm ... pcgifile.py is pretty explicit that it can't write
to your pcgi.soc socket.  Any possibility you left an earlier
LRP running?  Feel free to disagree with pcgifile.py's
interpretation of events, just send me a patch if you do ;-)

Also, since you mention that you're just getting started
with Apache, a couple other things worth mentioning.

1)  Your Apache cgi processes are probably running as user 
'nobody', so it may not be obvious that you have a file or 
directory it can't properly access.

2)  You can try to create /tmp/var on the server's local
filesystem and chmod 0777 it.  Then change Zope.cgi 
parameters to reflect the new var position.  Again, I'm 
only suggesting this because there may be an Apache 
issue you're not aware of or don't want to spend time 
tracking down just yet.

Here's a sidetrack that won't really help you solve 
your problem, but may give you some confidence that
pcgi is working (or not).  Grab the pcgitest and 
pcgitime.py files and put them in your Apache cgi-bin 
directory.  Edit the pcgitime info file to match 
your settings and try:

    http://.../cgi-bin/pcgitest/getTime 

You should get a timestamped response. See the notes at
http://starship.skyport.net/crew/jbauer/persistcgi/howto/
for further information.

Good luck,

Jeff Bauer
Rubicon, Inc.