RE: [Zope] - PCGI with IIS 4.0
My problem is that lured by the simplicity of getting pcgi to work on linux/apache I have promised to port my web app to IIS.
I remember that there used to be several references for getting PCGI to work on IIS, but I can't find any of them now ;(
and the included readme points to http://starship.skyport.net/crew/jbauer/persistcgi/ which is also not very helpful for IIS newbie like me (I have no idea how to make IIS execute the info file using pcgi_wrapper.exe, which I guess is the thing I should do)
Hannu,
Amos got pcgi-wrapper.exe successfully working with IIS back in August. I'll let him provide the details, then I'll add them to the pcgi docs. ;-)
I think one of the things he did was create a file association, .pcgi extensions to pcgi-wrapper.exe.
The pcgifile.py sanity tester should work (works with Win32/Apache) and the pcgitime.py is a good starter example to get pcgi working on NT.
Keep in mind that process creation is more expensive on NT vs. Unix. So although it should work for you, it may not sustain heavy loads. Don't tell us you're surprised <wink>.
Best regards,
Jeff Bauer
Note that on winNT Zope also supports an alternate publishing mechanism that was developed in-house by Digital Creations. This mechanism is similar to (but not exactly like) pcgi. It runs your Zope process as a win32 service, and provides a lightweight cgi exe which knows how to communicate requests to the Zope service (the moral equivalent of pcgi-wrapper). You should be able to install b3 on an NT machine and choose the "Install as an NT service and run with my existing web server" option. This will install the Zope instance as a service, and prompt you for a CGI directory into which it will place the cgi exe. Pick a directory set up for cgi with IIS when prompted. Note that you probably have to tweak your IIS configuration to get IIS to pass authentication headers to Zope. You need to make sure that BOTH "Windows NT Challenge/Response" AND "Basic Authentication" are DESELECTED for the cgi directory where you placed the cgi exe. Otherwise, IIS will intervene on every request and try to do the authentication itself (which will fail, of course). We hope to roll pcgi support into the win32 Zope release soon. Brian Lloyd brian@digicool.com Software Engineer 540.371.6909 Digital Creations http://www.digicool.com
At 10:22 AM 12/21/98 -0500, you wrote:
...
You should be able to install b3 on an NT machine and choose the "Install as an NT service and run with my existing web server" option.
This will install the Zope instance as a service, and prompt you for a CGI directory into which it will place the cgi exe. Pick a directory set up for cgi with IIS when prompted.
Just wondering, I tried installing Zope b3 onto this (the machine I'mat right now) NT Workstation, choosing to run it as a service and use my existing web server (Xitami - I haven't even gotten that far yet). The service will not run, claiming: "The Zope (Zope) service failed to start due to the following error: %1 is not a valid Windows NT application" I've searched the Registry (cautiously!), but with no luck. Any suggestions as to how I might trace this down? Anyone else successful with NT? Thanks, Brad Brad Marsh, Computer Specialist Center for Evaluation and Research http://www.tchp.org/cer/ research4@snowcrest.net
Brian Lloyd wrote:
Note that on winNT Zope also supports an alternate publishing mechanism that was developed in-house by Digital Creations. This mechanism is similar to (but not exactly like) pcgi. It runs your Zope process as a win32 service, and provides a lightweight cgi exe which knows how to communicate requests to the Zope service (the moral equivalent of pcgi-wrapper).
You should be able to install b3 on an NT machine and choose the "Install as an NT service and run with my existing web server" option.
This will install the Zope instance as a service, and prompt you for a CGI directory into which it will place the cgi exe. Pick a directory set up for cgi with IIS when prompted.
I have done this part, and the cgi-bin/WebSite.exe starts up and runs fine, giving the "! sorry not available" message when the service is not started, and the error mentioned in my original post ("no attribute argv") when the server is started The error is: Sorry, an error occurred.<p> <!-- Traceback (innermost last): File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 872, in publish_module File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 163, in __init__ File C:\Program Files\WebSite\lib\python1.5\cgi.py, line 795, in __init__ AttributeError: argv -->
Note that you probably have to tweak your IIS configuration to get IIS to pass authentication headers to Zope. You need to make sure that BOTH "Windows NT Challenge/Response" AND "Basic Authentication" are DESELECTED for the cgi directory where you placed the cgi exe. Otherwise, IIS will intervene on every request and try to do the authentication itself (which will fail, of course).
I have done that already, but as said above, it does not get that far. --------------- Hannu Krosing
participants (3)
-
Brad Marsh -
Brian Lloyd -
Hannu Krosing