« Back to History
ping_php.php
|
20260721_154032.php
Initial Bulk Import
Copy Code
<?php // ---- tiny probe (NO auth) ---- header('Content-Type: application/json; charset=utf-8'); ini_set('display_errors','1'); error_reporting(E_ALL); $out = ['ok'=>true, 'stage'=>'php']; try { $out['cwd'] = __DIR__; $out['php'] = PHP_VERSION; // try include auth (only to see errors) $auth = __DIR__ . '/../modules/auth/auth.php'; $out['auth_exists'] = file_exists($auth); if ($out['auth_exists']) { require $auth; $out['auth_loaded'] = true; } // try DB bootstrap $db = __DIR__ . '/../core/db.php'; $out['db_exists'] = file_exists($db); if ($out['db_exists']) { require $db; $out['db_loaded'] = true; if (isset($GLOBALS['pdo']) && $GLOBALS['pdo']) { $out['db_ok'] = true; $out['db_name'] = $GLOBALS['pdo']->query('SELECT DATABASE()')->fetchColumn(); } else { $out['db_ok'] = false; } } } catch (Throwable $e) { http_response_code(500); $out['ok'] = false; $out['error'] = $e->getMessage(); } echo json_encode($out, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);