mirror of
https://github.com/nihonbuzz/nihonbuzz-academy.git
synced 2026-01-27 02:41:58 +07:00
feat: Implement a new course learning system with dedicated layouts, lesson playback, and Spaced Repetition System (SRS) functionality.
This commit is contained in:
26
public/debug_pgsql.php
Normal file
26
public/debug_pgsql.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
echo "<h3>PHP Debug Info</h3>";
|
||||
echo "<strong>PHP Version:</strong> " . phpversion() . "<br>";
|
||||
echo "<strong>Loaded INI File:</strong> " . php_ini_loaded_file() . "<br>";
|
||||
echo "<strong>Active PDO Drivers:</strong> " . implode(', ', pdo_drivers()) . "<br>";
|
||||
|
||||
echo "<hr>";
|
||||
echo "<h3>Connection Test</h3>";
|
||||
|
||||
try {
|
||||
// Attempt standard connection
|
||||
$dsn = "pgsql:host=10.10.30.3;port=5432;dbname=nihonbuzz_academy";
|
||||
$user = "nihonbuzz_user";
|
||||
$pass = "password_to_be_changed"; // Using the default we set earlier
|
||||
|
||||
$pdo = new PDO($dsn, $user, $pass);
|
||||
echo "<span style='color:green; font-weight:bold;'>✅ Connection SUCCESS!</span><br>";
|
||||
echo "Connected to PostgreSQL database successfully.";
|
||||
} catch (PDOException $e) {
|
||||
echo "<span style='color:red; font-weight:bold;'>❌ Connection FAILED</span><br>";
|
||||
echo "Error Message: " . $e->getMessage() . "<br>";
|
||||
|
||||
if (strpos($e->getMessage(), 'could not find driver') !== false) {
|
||||
echo "<br><strong>Troubleshooting:</strong> The PostgreSQL driver is missing. Verify php.ini settings and restart the web server.";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user