Website redirect when php is down

Soldato
Joined
30 Mar 2004
Posts
9,732
Location
London
Is there any way to get a site to redirect if, say, php is down on the webserver and causing connections to time out?

We currently have our homepage set to our website, which is Joomla-based and uses PHP. On a couple of occasions, php has gone down on our (hosted)webserver, causing connections to the website to timeout. Other items on the webserver, such as an archive of our old website (which does not use php) still work fine when this happens.

The problem is, as our homepage is set to our website, when this happens everyone thinks that our internet is down and bombards support with calls.

Is there any way that a check could be performed when connecting, to see if the php site is working OK? Opening up the php website when it's OK and redirecting to another page when it's not?
 
It's not a database connection. A simple info.php file will not load either, whilst all other resources remain accessible. It's just all things php that go to pot.

This is on a Windows webserver, rather than Apache. I normally log a call and following a reboot of our server it all works fine, but this normally takes half a day.
 
I'll see if I can work something out in Javascript.

It is really weird when it happens. I'm guessing it's something to do with IIS.
 
It's happened again today. Example error:

"Fatal error: Maximum execution time of 30 seconds exceeded in E:\inetpub\vhosts\*****\httpdocs\modules\mod_ccy\mod_ccy.php on line 19"

It seems that something slows PHP responses down so much that it just times out. I could increase the response time in the php config, but responses simply shouldn't be taking this long.

Absolute pain.
 
Last edited:
What about if you put your whole page inside a frame and make an ajax call to the page. If it returns anything other than 200, display something else in the frame.
?

Interesting idea. I'll have a play with it.


For those interested, the host is Synetrix. They provide is with a decent 100Mb internet connection, but the windows IIS webserver is rather annoying to say the least.
 
Back
Top Bottom