RE: [PHP] script to check if server is up

2003-02-18 Thread Luke Woollard
Another useful idea is running a cron job (as root) every so often on each machine that opens a socket connection to a port (eg. for www: 80) If the socket connection returns false, you have a problem. You could then reboot the service (in this case apache or similar). I did this to check mysql w

Re: [PHP] script to check if server is up

2003-02-18 Thread Jason Sheets
Hi Pete, You could use PHP's command line execution programs to execute the ping command, then either check the output or check the return status of ping, if you do this make sure you pass ping some parameters that will limit the timeout and retries otherwise your PHP script may hang waiting for