[Zope] Published Modules w/FastCGI??

Miles Clark mmc@obispo.com
Tue, 9 May 2000 09:30:33 -0700 (Pacific Daylight Time)


Hi -

I'm trying to access a published module using FastCGI, and am having some
problems.

Following Amos' How-to ("How to Publish Your Own Python Modules"), I
created a simple Hello module and published it by altering z2.py:

#zh = zhttp_handler(MODULE, '', HTTP_ENV)
#hs.install_handler(zh)
sys.path.insert(0, '/path/to/my/module')  # I used a real path here
my_handler = zhttp_handler('Hello', '')
hs.install_handler(my_handler)

I can then start Zope (ZServer, really) and access my module (which
contains a "sayHello" function) like so:

http://localhost:8080/sayHello

No problems so far.

Following the appropriate documentation, I installed the latest fastcgi
snap release, and configured Zope to respond via FastCGI.  I was then able
to start Zope normally (using the original z2.py) and access the normal
Zope content from Apache via FastCGI.  No problem.

I then started my modified z2 (z2Hello.py - altered to respond to
FastCGI).  Again, when I hit it with the URL above, I can access my
publised Hello module without a hitch. However, when I attempt to access
my hello module using FastCGI, I get.... Zope!

http://localhost:8080/sayHello ----> my Hello module
http://localhost/z             ----> The Zope welcome screen
http://localhost/z/sayHello    ----> A Zope 'not found' error

My understanding was that I hadn't published the Zope module in
z2Hello.py, but up it comes anyway when FastCGI is involved.

So... My question is: How do I publish modules in Zope (w/o creating a
full Zope product) and access those modules via FastCGI?

Thanks!

miles