How do I restart IIS when the error Sevice unaviable is occuren. Does anybody have such php script or can wirte such script.
thanks in advance
Ramesh chaudhary
Printable View
How do I restart IIS when the error Sevice unaviable is occuren. Does anybody have such php script or can wirte such script.
thanks in advance
Ramesh chaudhary
If you could write a batch file that restarted the server, then you could restart the server using PHP. I don't know how you'd go about doing that, but you should look into it. Then, you can use exec() or shell_exec() to execute the batch file.
Now, how you would run a PHP script on an IIS server that was unavailable? I would have to say that it's impossible, as PHP is run "inside," if you will, the webserver, and if the server is unreachable, your PHP script is unreachable. you would need a program running in the background to check if it was down, and if so, that restarted it as well.
But if IIS is running your PHP scripts, how would you get it to execute in the first place? You'll need to start it directly from the server.Quote:
Originally Posted by RameshChaudhary
Is it possibel to creat batch file restartig IIS automatically when Service unaviable????
Rmaesh chaudhary
NEPAL
Yes. Just give it the command iisreset.