mirror of
https://github.com/myronblair/tomtomgames
synced 2026-06-30 17:51:08 -05:00
26 lines
847 B
PHP
26 lines
847 B
PHP
<?php
|
|
// Admin only diagnostic - delete after use
|
|
$files = [
|
|
'../../includes/db.php',
|
|
'../../includes/auth.php',
|
|
'../api/admin.php',
|
|
];
|
|
foreach ($files as $f) {
|
|
$full = __DIR__ . '/' . $f;
|
|
$out = shell_exec("php -l " . escapeshellarg($full) . " 2>&1");
|
|
echo $f . ": " . trim($out) . "\n";
|
|
}
|
|
|
|
// Also test DB connection directly
|
|
try {
|
|
require_once __DIR__ . '/../../includes/config.php';
|
|
require_once __DIR__ . '/../../includes/db.php';
|
|
$v = db()->query("SELECT COUNT(*) FROM users")->fetchColumn();
|
|
echo "\nDB OK — users: $v\n";
|
|
$v2 = db()->query("SELECT version FROM app_version ORDER BY id DESC LIMIT 1")->fetchColumn();
|
|
echo "App version: $v2\n";
|
|
} catch (Throwable $e) {
|
|
echo "\nDB ERROR: " . $e->getMessage() . "\n";
|
|
echo "File: " . $e->getFile() . " line " . $e->getLine() . "\n";
|
|
}
|