First off, windows has no clue what a fork is, much less the command 'shutdown -r -t 01'. You can get a windows based version here for windows 2000, http://support.microsoft.com/default.aspx?scid=kb;en-us;317371&sd=tech If you on windows xp or 2003 servers I'm not sure how this will work now that MS in there infinate wisdom has implemented the shutdown/ reboot logging stuff where you have to tell it why your rebooting or shutting it down. (IMHO the dumbest thing ever) >From personal experiance I would test this on a local machine first before putting it on a production system, as they don't always act the way you intend them to. Second, why are you having to reboot the system? Is an application stopping or something else like that because it would be easier to restart the service / application than rebooting the sytem if thats the case. Karl-Heinz Christian Zeck (christizeck84@xxxxxxxxx) wrote: > > I don't want to restart windows locally, I want to restart it > remotely. I need a php script that restarts the server. Is this > possible or not? > > > On 8/10/05, Jay Blanchard <jay.blanchard@xxxxxxxxxxxxxxxxxxxxx> wrote: > > [snip] > > Does anyone have any idea how to restart windows from a php script? > > I tried the following: > > exec('SHUTDOWN -r -t 01'); > > or > > exec('SHUTDOWN /r'); > > > > I received the following warning message: Warning: exec(): Unable to > > fork [SHUTDOWN -r -t 01]. > > > > I never used this kind of functions before. What's wrong? In IIS for > > "Execute Permissions" I have "Scripts and Executables". What > > permissions should I set for the Internet Guest Account? Or something > > else caused the problem, not the permissions? Please help me.:) > > [/snip] > > > > Everyone, repeat after me...... > > > > PHP is server-side, there's no place like home, > > PHP is server-side, there's no place like home, > > PHP is server-side, there's no place like home...... > > > > If you are trying to restart Windows, locally, you have to use something > > client-side to affect that. > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- "Computers are like air conditioners - they stop working properly when you open Windows" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php