Esempio n. 1
0
 */
echo "<br /><hr /><h4>Connexions aux bases</h4>";
affichage("Connexion au serveur MySQL '" . MYSQL_USER . "@" . MYSQL_HOST . " (using password: "******")'", mysql_pconnect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS), false, false, true);
$bases = array(BASEXHAM, BDD, CCAM_BDD);
foreach ($bases as $base) {
    affichage("Connexion à la base '" . $base . "'", mysql_select_db($base), false, false, true);
    affichage("Test des privilèges CREATE ALTER DROP", clUpdater::testGrantOnBase(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, $base), false, false, true);
}
//Installation des bases si vides
clUpdater::installBase(BASEXHAM, URLLOCAL . 'meta/install/tuv2_xham.sql', 'logs', MYSQL_USER, MYSQL_PASS, MYSQL_HOST);
ob_flush();
flush();
clUpdater::installBase(BDD, URLLOCAL . 'meta/install/tuv2_tuv2.sql', 'patients_presents', MYSQL_USER, MYSQL_PASS, MYSQL_HOST);
ob_flush();
flush();
clUpdater::installBase(CCAM_BDD, URLLOCAL . 'meta/install/tuv2_ccam.sql', 'ccam_liste', MYSQL_USER, MYSQL_PASS, MYSQL_HOST);
ob_flush();
flush();
$b = clUpdater::mysql_table_exists('R_ACTE_IVITE_PHASE', CCAM_BDD);
if (!$b) {
    $erreur = "</font><font><br />sous Debian: Rajoutez lower_case_table_names = 1 dans /etc/mysql/my.cnf";
} else {
    $erreur = "";
}
affichage("Test du parametre mysql server 'lower_case_table_names = 1'", array($b, $erreur), true);
/*
 * TESTS DE COMMUNICATION VERS L'EXTERIEUR
 */
echo "<br /><hr /><h4>Communication</h4>";
//Test connexion FTP vers serveur de veille
ob_flush();