[Zope] How? ZServer + PCGI
Alex Rice
alrice@swcp.com
Tue, 15 Jun 1999 00:24:31 -0600 (MDT)
On Mon, 14 Jun 1999 22:18:24 -0700,
Amos Latteier <amos@aracnet.com> said:
Amos> Look at ZServer/INSTALL.txt and ZServer/README.txt
Amos> Also try the ZServer start script:
Amos> $ python1.5.2 z2.py -h
Yes, thanks.
Amos> w_pcgi.py will compile the PCGI wrapper which you will need unless
Amos> you are using mod_pcgi or already have it compiled.
Amos> The basic idea of using PCGI and ZServer is this:
Amos> browser <--HTTP--> webserver <--CGI--> pcgi wrapper <--PCGI--> ZServer
Amos> Basically using PCGI with ZServer is exactly like using PCGI
Amos> normally, except for the fact that the long running process that
Amos> the PCGI wrapper communicates with is ZServer, not
Amos> pcgi_publisher.py The upshot of this difference is that you need
Amos> to start ZServer before you can use PCGI, since the PCGI wrapper
Amos> does not currently know how to activate ZServer. Also you need to
Amos> configure ZServer to communicate w/ PCGI, which is normally done
Amos> by passing the path to a PCGI info file to the PCGI Server.
OK, that clarifies things quite a bit. However, here is what I have. I
still can't get it working.
(using 2.0a2, python 1.5.2) I have already have a working Apache rewrite
rule I have been using for some time with pcgi_publisher.
% python w_pcgi.py
% chown -R nobody var/
% chgrp -R nobody var/
% cp Zope.cgi /home/httpd/cgi-bin/
% python z2.py -d 198.59.115.2 -p Zope.cgi
** [ why can't I leave off the DNS server, and let -p default to Zope.cgi? ]
zinit: Tue Jun 15 00:12:19 1999: Houston, we have forked
zinit: Tue Jun 15 00:12:19 1999: Houston, we have forked
zinit: Tue Jun 15 00:12:19 1999: Hi, I just forked off a kid: 4596
log: adding channel <trigger at 83dbcf8>
log: adding channel <zhttp_server at 8407960>
Warning: computing default hostname
Medusa (V1.7) started at Tue Jun 15 00:12:24 1999
Hostname: localhost
Port:9673
log: adding channel <FTPServer at 8407948>
FTP server started at Tue Jun 15 00:12:24 1999
Authorizer:None
Hostname: monsoon
Port: 9221
log: adding channel <PCGIServer at 84287c8>
log: adding channel <secure_monitor_server at 8429728>
Monitor Server (V1.2) started on port 9999
** [ now I browse to http://localhost/manage and I get this back from z2.py]
log: adding channel <PCGIChannel at 84290a0>
Unhandled exception in thread:
Traceback (innermost last):
File
"/usr/share/Zope-2.0.0a2-src/ZServer/PubCore/ZServerPublisher.py", line
97, in __init__
response._finish()
File "/usr/share/Zope-2.0.0a2-src/ZServer/PCGIServer.py", line 348, in
_finish
self.stdout.close()
File "/usr/share/Zope-2.0.0a2-src/ZServer/PCGIServer.py", line 383, in
close
Wakeup()
File "/usr/share/Zope-2.0.0a2-src/ZServer/medusa/select_trigger.py",
line 80, in pull_trigger
self.trigger.sendto (msg, self.addr)
socket.error: (13, 'Permission denied')
**[ ^C out of z2.py, and look for other python processes, there are none]
Amos> Clearly we need to improve our documentation, and our installation
Amos> programs :-( Note: we haven't yet overhauled the install
Amos> documentation for Zope 2. As always, we're open to constructive
Amos> criticism, suggestions, and contributions.
It's very likely that I shouldn't be mucking around with an alpha
release. However I really want to learn Zclasses and start using FTP
and WebDav. Also if this is going to ship this month then I guess you
need as many monkeys banging on it as possible?
Once this all sinks in (and I get it running) I'll try to make some
constructive suggestions.
Alex Rice | alrice@swcp.com | http://www.swcp.com/~alrice
Current Location: N. Rio Grande Bioregion, Southwestern USA