Urgent: PCGI does not work (on NT)
[Note: sorry if this appears twice; the first time I sent it doesn't seem to have appeared on the list; a later message I sent to zope-dev did appear so I figured something went wrong. apologies if it did not] Hi there, I'm sorry I keep sending out the same messages to this list, but I still haven't solved my problem and I need to solve it _very soon now_. I think I've run into a bug with PCGI on NT but it's odd that no one else ran into this before.. Could people send me their pcgi config files, please? I can't get mine to work. The problem: I have a zope.cgi file set up. It points to the PCGI_PUBLISHER (pcgi_publisher.py). But somehow, whatever I do, if I write the path with / or \, include f: or not, it just fails to find that file. the pcgiwrapper.exe keeps coming with a missing publisher: f:\Zope\pcgi\pcgi_publisher.py It just plain refuses to find the right file, whatever I do! I've even tried placing that .py file in the root of f:, and I've tried giving it another file, but no matter what I do, it fails to find it. I traced this message back to the file parseinfo.c. There it does a stat() to check if the file exists. Somehow that stat fails. As I don't have a C compiler for NT I can't debug this any further.. This is terribly weird. I've even tried using Zope 2.0's pcgi .exe files in the hope that they would work, but no luck. My current zope.cgi file (*please* send me yours if you have it working on NT!): #!f:\zope\pcgi\win32\pcgi-wrapper.exe PCGI_NAME=Zope PCGI_PORT=8090 PCGI_MODULE_PATH= f:\Zope\lib\python\Main.py PCGI_PUBLISHER= f:\Zope\pcgi\pcgi_publisher.py PCGI_EXE= f:\Zope\bin\python.exe PCGI_SOCKET_FILE= f:\Zope\var\pcgi.soc PCGI_PID_FILE= f:\Zope\var\pcgi.pid PCGI_ERROR_LOG= f:\Zope\var\pcgi.log PCGI_DISPLAY_ERRORS=1 BOBO_REALM= Zope BOBO_DEBUG_MODE=1 INSTANCE_HOME= f:\Zope Regards, Martijn
Hi there, I solved the problem. It turned out to be extremely silly. I'm not sure if I was extremely stupid or not, but to prevent such future mistake I suggest patching the pcgi parser (to do what I describe in this mail): Martijn Faassen wrote:
The problem: [snip] missing publisher: f:\Zope\pcgi\pcgi_publisher.py
It just plain refuses to find the right file, whatever I do! I've even tried placing that .py file in the root of f:, and I've tried giving it another file, but no matter what I do, it fails to find it.
[snip]
I traced this message back to the file parseinfo.c. There it does a stat() to check if the file exists. Somehow that stat fails. As I don't have a C compiler for NT I can't debug this any further.. This is terribly weird. I've even tried using Zope 2.0's pcgi .exe files in the hope that they would work, but no luck.
My current zope.cgi file (*please* send me yours if you have it working on NT!):
I'm much indebted to Duncan Booth for sending me his! This helped me track down the problem. [snip]
PCGI_MODULE_PATH= f:\Zope\lib\python\Main.py ^ |------- see the space?
It does not accept spaces after the '='! The error message is misleading as it reads like it is missing an existing file. A simple patch to the pcgi C code could be to strip any whitespace away from the pathname. The python based tester is misleading as it does accept whitespace, it seems.. That was my problem. What a stupid problem to waste so much time on. :) Regards, Martijn
participants (1)
-
Martijn Faassen