This commit is contained in:
DIGIDEV\corer committed 2026-10-20 13:16:38 +09:00
commit 3e4a056b14
67 files changed
+13926

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
<?php
ini_set('display_errors', '1');
error_reporting(E_ALL);
echo 'PHP ' . PHP_VERSION . '<br>';
echo 'PDO: ' . (class_exists('PDO') ? 'ya' : 'TIDAK ADA') . '<br>';
echo 'pdo_mysql: ' . (extension_loaded('pdo_mysql') ? 'ya' : 'TIDAK ADA') . '<br>';
echo 'config.php: ' . (is_file(__DIR__ . '/config.php') ? 'ada' : 'TIDAK ADA di ' . __DIR__) . '<br><hr>';
try {
$cfg = require __DIR__ . '/config.php';
$c = $cfg['db'];
foreach (['localhost', '127.0.0.1', $c['host']] as $h) {
try {
new PDO("mysql:host=$h;port={$c['port']};dbname={$c['name']};charset=utf8mb4",
$c['user'], $c['password'], [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
echo "$h : OK<br>";
} catch (Throwable $e) {
echo "$h : " . htmlspecialchars($e->getMessage()) . '<br>';
}
}
} catch (Throwable $e) {
echo 'FATAL: ' . htmlspecialchars(get_class($e) . ': ' . $e->getMessage()
. ' di ' . $e->getFile() . ':' . $e->getLine());
}