Page 1 of 1

problems with PHP and SC.exe

Posted: Mon Feb 16, 2004 1:02 pm
by aarak
I am running Apache 1.3.29 on Windows Server 2k3 Standard edition with PHP 4.3.4 as a module.

I have a script that writes a text file, and then resets a service so that the new text is read into the memory of the program associated with the service.

I have the script calling

$output=`sc stop myservice`
sleep(5);
$output=`sc start myservice`

and then the script outputs a list of changes made...and a link back to the main script that edits the text file.

The problem I am having is that some clients seem to have a problem with using the script. The will initiate the script that calls the service stop and then start.....but the service will stop...remain in a stopped state, and must be manually restarted from the console.

I also notice that when this starts occuring, I cannot reset the apache service, and they seem to have problems with php pages not displaying on the server.

Does anyone know what may cause this?

Posted: Mon Feb 16, 2004 3:08 pm
by liljester
if you tell php to sleep(), wont that make apahce stop? (its not multi-threaded is it?)

i havent delt with apahce and php much =/ why not use iis 6 if you're using win2k3?

...

Posted: Mon Feb 16, 2004 3:31 pm
by aarak
Apache is multithreaded I am sure...

as to why I am not using IIS 6....I dont know enough about it to set up virtual hosts etc with it like I can with apache...or to get the fine grained control that apache gives me....