Ejemplo n.º 1
0
 <?php 
function find_SQL_Version()
{
    $output = shell_exec('mysql -V');
    preg_match('@[0-9]+\\.[0-9]+\\.[0-9]+@', $output, $version);
    return $version[0];
}
if (find_SQL_Version() >= 5.1) {
    $response = '<strong><font class="good">Yes</font></strong>';
} else {
    $response = '<strong><font class="bad">No</font></strong>';
}
echo json_encode($response);
?>
 
Ejemplo n.º 2
0
    $conn = new DBConnection();
    $value = (double) mysqli_get_server_info($conn->id());
    return $value;
}
$sections['PHP'] = 'PHP';
$phpver = 'PHP version: ' . phpversion();
$html = "{$phpver}  <br />";
if (phpversion() >= "5.1.2") {
    $trouble['PHP'][] = array('passed' => true, 'text' => $html);
} else {
    $trouble['PHP'][] = array('passed' => false, 'text' => $html);
}
$html = 'Checking Magic Quotes Runtime is disabled';
if (get_magic_quotes_runtime()) {
    $trouble['PHP'][] = array('passed' => false, 'text' => $html);
} else {
    $trouble['PHP'][] = array('passed' => true, 'text' => $html);
}
$sections['Server'] = 'Server';
$sqlver = 'MYSQL version: ' . find_SQL_Version();
$html = "  {$sqlver}";
if (find_SQL_Version() >= 5) {
    $trouble['Server'][] = array('passed' => true, 'text' => $html);
} else {
    $html = $trouble['Server'][] = array('passed' => false, 'text' => $html);
}
$smarty->assignByRef('sections', $sections);
$smarty->assignByRef('trouble', $trouble);
$page->setContent($smarty->fetch(get_tpl('admin_troubleshooting')));
$page->addContext($menubox->generate());
$page->generate();
Ejemplo n.º 3
0
     fclose($db_sql_file);
 }
 $db_query = explode("CREATE", $db_query);
 for ($i = 0; $i < sizeof($db_query); $i++) {
     if ($db_query[$i] && $db_query[$i] != "\n" && trim($db_query[$i]) != "") {
         //echo "<br>".$db_query[$i]."<br>--";
         $table_key = substr($db_query[$i], 22, strpos($db_query[$i], "(") - 24);
         $table_val = substr($db_query[$i], strpos($db_query[$i], "(") + 1, strpos($db_query[$i], "ENGINE") - strpos($db_query[$i], "(") - 3);
         //echo "<br>".$table_key."-".$table_val."<br>--";
         if ($table_key != "") {
             $tables_names[] = $table_key;
         }
     }
 }
 echo $lng[21][3] . "<br/>";
 echo $lng[21][64] . find_SQL_Version() . "<br/><br/>";
 $result = mysql_list_tables($db);
 $fl = 1;
 $i = 0;
 echo $lng[21][4] . "</br>";
 //---------------  start checking DB tables -----------------
 $result = mysql_list_tables($db);
 while ($row = mysql_fetch_row($result)) {
     $tables_names2[] = $row[0];
 }
 while (list($key, $val) = each($tables_names)) {
     if (!in_array($val, $tables_names2)) {
         $fl = 0;
         echo "<span class='error'>" . $lng[21][73] . " " . $val . "</span><br/><br/>";
     }
 }