Re: Is it possible to restart Windows Apache (service) on a PHP script?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You could try using exec to set up an "AT" job with a short delay which will
then run 'net apache restart' - I'm not a total windows guru so I can't give you
the exact recipe...

Something like exec('AT 12:00 "net apache restart"');

Check the documentation on the AT command...

One possible extra advantage is that you could cancel the 'AT' job during the
delay period if you clicked restart by accident :)

Louie Miranda wrote:
> Thanks for your suggestions.
> 
> But, both did not worked.
> 
> Louie
> 
> On 10/19/07, Philip Thompson <philthathril@xxxxxxxxx> wrote:
>> On 10/19/07, Robert Degen <robert.degen@xxxxxxxxxxxxxx> wrote:
>>> Why don't you try a
>>>
>>>   passthru('net apache restart')
>>>
>>> perhabs another parameter order, but I think It won't work.
>>> Stopping it might work, but restarting...
>>>
>>>
>>>
>>> On Fr, Okt 19, 2007 at 04:32:45 +0800, Louie Miranda wrote:
>>>> Is it possible to restart Windows Apache (service) on a PHP script?
>>>>
>>>> i have installed PHP/Apache on a Windows machine. Added the ext
>>> windows32
>>>> service.
>>>> But could not find any how to or information online.
>>>>
>>>> Please help!
>>>>
>>>> --
>>>> Louie Miranda (lmiranda@xxxxxxxxx)
>> This reminds me of the time I was remoting into a machine (using Altiris,
>> I
>> think) to do some work on it. I then needed to restart it... so I did.
>> Well,
>> class, what happens when you turn off Mr. Computer?
>>
>> Not saying that this is the same thing...  b/c if you push a "restart"
>> command, then it *should* come back up. =/ Sorry, I don't know the exact
>> command, but consider using exec().
>>
>> Good Luck,
>> ~Philip
>>
>> PS... Yay, it's Friday!
>>
> 
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux