diff --git a/index.php b/index.php index 097c521..66f7713 100644 --- a/index.php +++ b/index.php @@ -1,21 +1,56 @@ 🌍 WebGIS Subdomain is Live!"; -echo "
Current Server: " . $_SERVER['SERVER_NAME'] . "
"; -echo "PHP Version: " . phpversion() . "
"; +try { + $dsn = "pgsql:host=$host;port=5432;dbname=$db;"; + $pdo = new PDO($dsn, $user, $pass, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]); -// Check for common GIS extensions (optional but helpful) -$extensions = ['gd', 'intl', 'bcmath', 'pdo_pgsql']; -echo "PostGIS Version: " . $version[0] . "
"; + } +} catch (PDOException $e) { + echo "" . $e->getMessage() . "
"; } -echo "If you see this, your Nginx → PHP-FPM bridge is working perfectly over HTTPS.
"; ?> + + + + + + PDO::ERRMODE_EXCEPTION, + // PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + // PDO::ATTR_EMULATE_PREPARES => false + // ]; + + + // $dsn = "pgsql:host=localhost;dbname=getenv('POSTGRES_DB');port=5432"; + // $pdo = new PDO($dsn, getenv('POSTGRES_USER'), 'getenv('POSTGRES_PASSWORD'), $opt); + + + // } catch(PDOException $e) { + // echo "Error: ".$e->getMessage(); + // } +?> +