Re: Restarting windows from php

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

 



Hi,

I think, Karl says that to how to shutdown the server.

This is posible with rundll, or using Win32API functions. 

This is the detailed information about how to use Win32API functions
in PHP: 
http://www.php.net/manual/en/ref.w32api.php

So, also this is an information about ExitWindows() API function:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/exitwindows.asp

Best Regards.

"Jay Blanchard" <jay.blanchard@xxxxxxxxxxxxxxxxxxxxx> writes:

> [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
>

-- 
Cafer Şimşek
http://cafer.org

-- 
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