You are here: RE: [PHP] Restarting windows from php « PHP « IT news, forums, messages
RE: [PHP] Restarting windows from php

Posted by tg-php on 08/10/05 17:28

Could be that he's trying to use PHP to restart the server. Or could be using php via command line or through a system like GTK or Winbinder. It's worth noting that you should make sure you're restarting the machine you think you are, but the question still remains... is this possible and how is it done?

If shutdown can't be forked, is it an issue of PHP spinning off the program and not and returning control to PHP before the program is finished (so they run concurrently)... if that's the case, is there a way to make PHP give full control to the program it calls?

If just using EXEC to call a program is considered 'forking', is there another method? Could you use PHP to EXEC a script file that ran shutdown instead? Would this behave better?

Is there a way to do this and/or any tricks to making it work?

I think that's the question being asked.

-TG


= = = Original message = = =

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


___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация