Check that the PostgreSLQ module is available.
authorDave Page <dpage@pgadmin.org>
Fri, 22 Aug 2008 14:04:56 +0000 (15:04 +0100)
committerDave Page <dpage@pgadmin.org>
Fri, 22 Aug 2008 14:04:56 +0000 (15:04 +0100)
global.php

index 9620188f21e1e6ea020e6d2b21603476f639e685..2d0b2527b7d8533c2618636e5a554de15eb242ef 100644 (file)
 //
 ///////////////////////////////////////////////////////////////////////////////
 
+// Constants
+$APP_COPYRIGHT = "Copyright &copy; 2008, <a href=\"http://www.enterprisedb.com\" target=\"_new\">EnterpriseDB</a> UK Ltd.";
+$APP_VERSION = "1.1";
+$APP_NAME = "pgPhoneHome";
+
+
 // Ensure we can get error messages
 ini_set("track_errors", "1");
 
@@ -20,10 +26,9 @@ if (file_exists("config.php"))
     require "config.php";
 else 
     www_error("No configuration found", "No configuration file was found. Please copy config.php.in to config.php and edit as required.", "servers");
-   
-// Constants
-$APP_COPYRIGHT = "Copyright &copy; 2008, <a href=\"http://www.enterprisedb.com\" target=\"_new\">EnterpriseDB</a> UK Ltd.";
-$APP_VERSION = "1.0";
-$APP_NAME = "pgPhoneHome";
 
+// Check that the PostgreSQL module is available
+if (!extension_loaded("postgresql"))
+    www_error("PHP configuration error", "The postgresql module for PHP is not available. Please enable the module in your PHP configuration.", "servers");
+   
 ?>