tbrehm
2009-03-17 626636f5b5874a48a3a016b8998e66a2fb94d70b
server/server.php
@@ -32,6 +32,7 @@
require("lib/app.inc.php");
set_time_limit(0);
ini_set('error_reporting','E_ALL & ~E_NOTICE');
// make sure server_id is always an int
$conf["server_id"] = intval($conf["server_id"]);
@@ -67,7 +68,7 @@
$app->log("Set Lock: ".$conf["temppath"].$conf["fs_div"].".ispconfig_lock", LOGLEVEL_DEBUG);
if($app->dbmaster->connect()) {
if($app->db->connect() && $app->dbmaster->connect()) {
   // get the dalaog_id of the last performed record
   $server_db_record = $app->dbmaster->queryOneRecord("SELECT updated, config FROM server WHERE server_id = ".$conf["server_id"]);
@@ -113,9 +114,12 @@
      $app->plugins->loadPlugins('core');
   }
} else {
   $app->log("Unable to connect to master server.",LOGLEVEL_ERROR);
   if(!$app->db->connect()) {
      $app->log("Unable to connect to local server.".$app->db->errorMessage,LOGLEVEL_WARN);
   } else {
      $app->log("Unable to connect to master server.".$app->dbmaster->errorMessage,LOGLEVEL_WARN);
   }
}
// Remove lock
@unlink($conf["temppath"].$conf["fs_div"].".ispconfig_lock");