[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
    on Tuesday, April 20, 2004 3:41 PM said:

> Hi there I was wondering how people usually turn the app off during
> system maintainance. During the hours of 6-7 the database goes down
> for backing up, the users therefore keeping trying to get into the
> system, i get an error that the database is down when i know it
> should be down near that time. Without causing too many if statements
> what is the best way to do this ?

i don't know if this is possible (it probably is) but maybe you could
have apache serve a "server down" page for all requests to the website?

alternatively, using php it'd be something like the following:

store_open.php:
<?php
        define("STORE_IS_OPEN", false);

        if(!STORE_IS_OPEN)
        {
                header("Location: server_down.php"); exit;
        }
?>

index.php:
<?php

        require "store_open.php";

        // rest of page
        ...
        
?>

if the store is open the user will see what they are expecting. if the
store is closed they will be redirected to the server_down.php page.


hth,
chris.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to