|
-
Oct 19th, 2006, 04:40 AM
#1
Thread Starter
Member
Automatically restart IIS 6.0 when 'Service Unavailable'
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
-
Oct 19th, 2006, 06:59 AM
#2
Re: Automatically restart IIS 6.0 when 'Service Unavailable'
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.
-
Oct 19th, 2006, 03:33 PM
#3
Re: Automatically restart IIS 6.0 when 'Service Unavailable'
 Originally Posted by RameshChaudhary
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
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.
-
Oct 19th, 2006, 10:56 PM
#4
Thread Starter
Member
Re: Automatically restart IIS 6.0 when 'Service Unavailable'
Is it possibel to creat batch file restartig IIS automatically when Service unaviable????
Rmaesh chaudhary
NEPAL
-
Oct 24th, 2006, 03:53 PM
#5
Re: Automatically restart IIS 6.0 when 'Service Unavailable'
Yes. Just give it the command iisreset.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|