G
I have a simple perl script which permits me to query the Services ona
Win2k server and check status for each to see if it is running.
I have two other simple script which will stop and start any service
for me.
The problem is making these work from a web interface. I'm able to do
the first (i.e. get list of running services and check status for each:
http://mrtg.fusionserver.com/Services/status.pl
Youll notice I'm filtering so I just see the two WebTrends services.
But my links to stop/start the services don't work. The same code
works fine from the command line -- just not from the web browser.
If you test it out and try to stop one of the services, the error you
see is generated by this line of code:
Win32::Service::StopService('',$DefProcess) or $abort = 1;
$abort is a flag I use on the next line to stop the script and display
the erro you see. $DefProcess is properly defined -- so that's not the
problem.
I assume it is a permissions problem of some type, but I can't figure
it out. Does anyone have any ideas of what I can do to make this work?
Thanks!
-peter
Win2k server and check status for each to see if it is running.
I have two other simple script which will stop and start any service
for me.
The problem is making these work from a web interface. I'm able to do
the first (i.e. get list of running services and check status for each:
http://mrtg.fusionserver.com/Services/status.pl
Youll notice I'm filtering so I just see the two WebTrends services.
But my links to stop/start the services don't work. The same code
works fine from the command line -- just not from the web browser.
If you test it out and try to stop one of the services, the error you
see is generated by this line of code:
Win32::Service::StopService('',$DefProcess) or $abort = 1;
$abort is a flag I use on the next line to stop the script and display
the erro you see. $DefProcess is properly defined -- so that's not the
problem.
I assume it is a permissions problem of some type, but I can't figure
it out. Does anyone have any ideas of what I can do to make this work?
Thanks!
-peter