# V1.1 6-10-2009 Added Cron reset ############################################################################### */ //error_reporting(0); // Disable PHP errors and warnings // Comment to Enable for testing chdir(dirname(__FILE__)); // Change wd to this files location include_once "includes/config.inc.php"; include_once "includes/functions.php"; run_location_tracker(); // Have servers moved if moved update configuration print "\n"; // === Reset Cron ============================================================= if (!apache_running()) { // Apache not running however Cron may have been set_cron_tracker("stop"); // left set to run after a power fail hence reset } // ========================================================= End Reset Cron === print " ================== UNIFORM SERVER STATUS ==================\n\n"; if (get_ip_current()) { // Current IP address print " Your Internet IP Address = {$ip_current}\n"; // as seen from Internet } else { // Either not connected print " Your Internet IP Address = Not connected or error! \n"; // to Internet } // or errors returned if (test_access()) {
} // ================================================== END RUN APACHE SERVER === print "\n"; // === RUN CRON =============================================================== if ((int) $server_operation & 16) { // Cron enabled by config or parameter if (apache_running()) { // Only run cron if Apache running // otherwise ignore and exit quietly if (get_cron_tracker() == "run") { // Cron already running print " Cron already running\n"; // Already running, give up } else { // not running set_cron_tracker("run"); // set tracker to run print " Cron started \n"; // inform user // Test switch between the two: visibe //$cmd = 'start ..\..\usr\local\php\php.exe run_cron.php'; // Test // Test switch between the two: hidden $cmd = 'start uniserv.exe "..\\..\\usr\\local\\php\\php.exe run_cron.php"'; pclose(popen($cmd, 'r')); // Start detatched process } } //End Apache running } else { print " Cron not enabled in config.inc.php\n"; print " Or disabled by a user parameter\n";