Commit 61377e2e authored by tbrehm's avatar tbrehm

Fixed a problem in database replication of multiserver setups.

Added a missing language string in server config form.
parent b2b44b5e
......@@ -358,7 +358,7 @@ if($install_mode == 'standard') {
}
//** Configure Apache
swriteln("\nHint: If this server shall run the ispconfig interface, select 'y' in the next option.\n");
swriteln("\nHint: If this server shall run the ispconfig interface, select 'y' in the 'Configure Apache Server' option.\n");
if(strtolower($inst->simple_query('Configure Apache Server',array('y','n'),'y')) == 'y') {
$conf['services']['web'] = true;
swriteln('Configuring Apache');
......
......@@ -45,4 +45,5 @@ $wb["crontab_dir_txt"] = 'Path for individual crontabs';
$wb["wget_txt"] = 'Path to wget program';
$wb["web_user_txt"] = 'Apache user';
$wb["web_group_txt"] = 'Apache group';
$wb["security_level"] = 'Security level';
?>
\ No newline at end of file
......@@ -40,6 +40,11 @@ class app {
if($conf["start_db"] == true) {
$this->load('db_'.$conf["db_type"]);
$this->db = new db;
if($this->db->linkId) $this->db->closeConn();
$this->db->dbHost = $conf["db_host"];
$this->db->dbName = $conf["db_database"];
$this->db->dbUser = $conf["db_user"];
$this->db->dbPass = $conf["db_password"];
/*
Initialize the connection to the master DB,
......
......@@ -59,8 +59,8 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
function updateError($location)
{
global $app;
$this->errorNumber = mysql_errno();
$this->errorMessage = mysql_error();
$this->errorNumber = mysql_errno($this->linkId);
$this->errorMessage = mysql_error($this->linkId);
$this->errorLocation = $location;
if($this->errorNumber && $this->show_error_messages && method_exists($app,'log'))
{
......
......@@ -118,10 +118,12 @@ class modules {
//$tmp_sql1 .= "$idx[0]";
//$tmp_sql2 .= "$idx[1]";
$sql = "REPLACE INTO $d[dbtable] ($tmp_sql1) VALUES ($tmp_sql2)";
$app->db->errorNumber = 0;
$app->db->errorMessage = '';
$app->db->query($sql);
if($app->db->errorNumber > 0) {
$replication_error = true;
$app->log("Replication failed. Error: (" . $d[dbtable] . ") " . $app->db->errorMessage . " # SQL: " . $sql,LOGLEVEL_ERROR);
$app->log("Replication failed. Error: (" . $d[dbtable] . ") in mysql server: (".$app->db->dbHost.") " . $app->db->errorMessage . " # SQL: " . $sql,LOGLEVEL_ERROR);
}
$app->log("Replicated from master: ".$sql,LOGLEVEL_DEBUG);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment