Re: [Zope] zope as win32 service and stupid_log_file
I am not sure if this applies or not but here goes. On a WIN NT server I wanted to get zope running with another program on the same server that also required python. Problem is it needed a different version of python that had been hacked and wouldn't work with Zope. It also set up some environment variables that zope couldn't live with. So I installed zope as an app and used srvany (part of the windows NT resource kit) to serve cmd calling a cmd file that set the variables to values zope could live with and then called zopes start.bat It is installed as an app and runs as a service in it's own virtual machine. HTH, Mike. Message: 6 Date: Wed, 06 Mar 2002 16:50:44 +0100 From: "Cornelis J. de Brabander" <brabander@fsw.LeidenUniv.nl> To: zope <zope@zope.org> Subject: [Zope] zope as win32 service and stupid_log_file Did anybody succeed in activating that STUPID_LOG_FILE when running zope as a win nt service? Creating a environment variable does not help. I can understand that because this would result in a conflict when running two versions of zope on the same machine. So there would have to be a environment variable that is bound to a specific service. zope 2.4.3. python 2.1. Cornelis J. de Brabander ========================================== Department of Education, Leiden University P.O.Box 9555, NL-2300 RB Leiden +31 71 527 3422/3401 brabander@fsw.leidenuniv.nl ==========================================
[Echlin, Michael]
I am not sure if this applies or not but here goes.
On a WIN NT server I wanted to get zope running with another program on the same server that also required python. Problem is it needed a different version of python that had been hacked and wouldn't work with Zope. It also set up some environment variables that zope couldn't live with.
So I installed zope as an app and used srvany (part of the windows NT resource kit) to serve cmd calling a cmd file that set the variables to values zope could live with and then called zopes start.bat
It is installed as an app and runs as a service in it's own virtual machine.
It's a good approach but I tend to just go to the registry and change the command line that the service uses when it launches Zope. Cheers, Tom P
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Thomas B. Passin Sent: donderdag 7 maart 2002 0:06 To: zope@zope.org Subject: Re: [Zope] zope as win32 service and stupid_log_file
[Echlin, Michael]
I am not sure if this applies or not but here goes.
On a WIN NT server I wanted to get zope running with another program on the same server that also required python. Problem is it needed a different version of python that had been hacked and wouldn't work with Zope. It also set up some environment variables that zope couldn't live with.
So I installed zope as an app and used srvany (part of the windows NT resource kit) to serve cmd calling a cmd file that set the variables to values zope could live with and then called zopes start.bat
It is installed as an app and runs as a service in it's own virtual machine.
It's a good approach but I tend to just go to the registry and change the command line that the service uses when it launches Zope.
This looks to me as the way to go, but how do I do that? I have a registry key that starts the service: "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\zope243\Parameters\sta rt" Currently its value reads: ""E:\zope\243\bin\python.exe" "E:\zope\243\z2.py" -S -D" Do I have to create another parameter with the name "STUPID_LOG_FILE" and value "E:\zope\243\var\stupid_log_file.log" or something similar? tia Cornelis J. de Brabander ========================================== Department of Education, Leiden University P.O.Box 9555, NL-2300 RB Leiden +31 71 527 3422/3401 brabander@fsw.leidenuniv.nl ==========================================
I would do: ""E:\zope\243\bin\python.exe" "E:\zope\243\z2.py" -S -D STUPID_LOG_FILE=Z2_DETAIL.log" or something like that. On Thu, Mar 07, 2002 at 02:17:07PM +0100, Cornelis J. de Brabander wrote:
This looks to me as the way to go, but how do I do that? I have a registry key that starts the service: "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\zope243\Parameters\sta rt" Currently its value reads: ""E:\zope\243\bin\python.exe" "E:\zope\243\z2.py" -S -D" Do I have to create another parameter with the name "STUPID_LOG_FILE" and value "E:\zope\243\var\stupid_log_file.log" or something similar?
tia
Greetings Christian -- Christian Theune - ct@gocept.com gocept gmbh & co.kg - schalaunische strasse 6 - 06366 koethen/anhalt tel.+49 3496 3099112 - fax.+49 3496 3099118 mob. - 0178 48 33 981 reduce(lambda x,y:x+y,[chr(ord(x)^42) for x in 'zS^BED\nX_FOY\x0b'])
OK, this did the trick. Thank you and other responders to this question. cb Cornelis J. de Brabander ========================================== Department of Education, Leiden University P.O.Box 9555, NL-2300 RB Leiden +31 71 527 3422/3401 brabander@fsw.leidenuniv.nl ==========================================
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Christian Theune Sent: donderdag 7 maart 2002 14:41 To: zope@zope.org Subject: Re: [Zope] zope as win32 service and stupid_log_file
I would do:
""E:\zope\243\bin\python.exe" "E:\zope\243\z2.py" -S -D STUPID_LOG_FILE=Z2_DETAIL.log"
or something like that.
On Thu, Mar 07, 2002 at 02:17:07PM +0100, Cornelis J. de Brabander wrote:
This looks to me as the way to go, but how do I do that? I have a registry key that starts the service:
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\zope243\Para meters\sta
rt" Currently its value reads: ""E:\zope\243\bin\python.exe" "E:\zope\243\z2.py" -S -D" Do I have to create another parameter with the name "STUPID_LOG_FILE" and value "E:\zope\243\var\stupid_log_file.log" or something similar?
tia
Greetings
Christian
-- Christian Theune - ct@gocept.com gocept gmbh & co.kg - schalaunische strasse 6 - 06366 koethen/anhalt tel.+49 3496 3099112 - fax.+49 3496 3099118 mob. - 0178 48 33 981
reduce(lambda x,y:x+y,[chr(ord(x)^42) for x in 'zS^BED\nX_FOY\x0b'])
[Cornelis J. de Brabander]
Thomas B. Passin
It's a good approach but I tend to just go to the registry and change the command line that the service uses when it launches Zope.
This looks to me as the way to go, but how do I do that? I have a registry key that starts the service:
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\zope243\Parameters\sta
rt" Currently its value reads: ""E:\zope\243\bin\python.exe" "E:\zope\243\z2.py" -S -D" Do I have to create another parameter with the name "STUPID_LOG_FILE" and value "E:\zope\243\var\stupid_log_file.log" or something similar?
I thought you wanted to use a different python version. If so, change the path to python.exe in the value of the registry key. Or add any other command line parameter, like the log file name, that you would want to if you were using a command prompt session. You should look in z2.py in to get the exact syntax for the command line options. I'm never quite sure if you use the key from HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\ or HKEY_LOCAL_MACHINE\System\ControlSet001\Services\ On my Win2000 machine, it seems that whichever one I change (as Adminstrator, of course) causes the other one to immediately change too. In principle, though, I would think that ControlSet001 (or 002, or where ever the Zope services key is) would be the right one. Tom P
participants (4)
-
Christian Theune -
Cornelis J. de Brabander -
Echlin, Michael -
Thomas B. Passin