Exemplo n.º 1
0
<div id='slony_failed_tests' style='font-weight:heavy;color:#ff0000;'>
<?php 
if ($bad_ssh = slony::check_ssh()) {
    foreach ($bad_ssh as $bad) {
        echo "Unable to SSH to {$bad}.  <br />";
    }
    //  $disable_slony = true;
}
//var_dump(slony::check_dbconnection());
if ($bad_db = slony::check_dbconnection()) {
    foreach ($bad_db as $bad) {
        echo "User '{$bad['user']}' can not connect to database {$bad['conninfo']} with the error \"{$bad['error']}\"  <br />";
    }
}
//var_dump(slony::check_slony_is_installed());
if (!slony::cluster_defined()) {
    //we do not need to perform this check all the time
    //it is reasonably likely that no one is going to uninstall slony from a node
    foreach ($bad_slony = slony::check_slony_is_installed() as $key => $bad) {
        if (!$bad['success']) {
            $disable_slony = true;
            if ($bad['success'] === false) {
                echo "Unable to determine Slony-I installation status on {$bad['host']} for reason \"{$bad['error']}\" <br />";
            } else {
                echo "Slony-I is not installed on {$bad['host']}.  <br />";
            }
        }
    }
}
?>
</div><?php 
Exemplo n.º 2
0
Arquivo: db.php Projeto: hshoghi/cms
 HAVE CONFLICTING DEFINITIONS!  REPLICATION NOT PERMITTED!</strong><?php 
    } else {
        echo $rep_on ? 'ON' : 'OFF';
    }
    if (!$r->Fields('sequence')) {
        ?>
<br/> <strong class='sequence_warning'>THIS TABLE HAS NO ID SEQUENCE!</strong><?php 
    }
    if ($r->Fields('haspkey') == 'f') {
        ?>
<br /> <strong class='sequence_warning'>THIS TABLE HAS NO PRIMARY KEY!</strong><?php 
    }
    ?>
		</td>
		<td <?php 
    echo slony::cluster_defined() ? '' : 'class="hide"';
    ?>
 >
  
                         <script type='text/javascript'>var rep_checkbox_orig_state_<?php 
    echo $r->Fields('tablename');
    ?>
 = <?php 
    echo $rep_on ? 'true' : 'false';
    ?>
;</script>
                     <?php 
    if (!$conflict) {
        ?>
<input id='rep_checkbox_<?php 
        echo $r->Fields('tablename');