problems with PHP and SC.exe

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aarak
Forum Newbie
Posts: 2
Joined: Mon Feb 16, 2004 1:02 pm

problems with PHP and SC.exe

Post 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?
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Post 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?
aarak
Forum Newbie
Posts: 2
Joined: Mon Feb 16, 2004 1:02 pm

...

Post 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....
Post Reply