// These vars are used to connect db and create test table.
// values can be set to meet your environment
-$conn_str = "host=localhost"; // connection string
+$conn_str = "host=localhost dbname=test"; // connection string
$table_name = "php_pgsql_test"; // test table that should be exist
$num_test_record = 1000; // Number of records to create
// with no username/password, AND
// * we have create/drop privileges on the entire "test"
// database
+
+include("config.inc");
+
if (!extension_loaded("pgsql") && ini_get("enable_dl")) {
$dlext = (substr(PHP_OS, 0, 3) == "WIN") ? ".dll" : ".so";
@dl("pgsql$dlext");
if (!extension_loaded("pgsql")) {
die("skip\n");
}
-$conn = @pg_connect("host=localhost dbname=test");
+$conn = @pg_connect($conn_str);
if (!is_resource($conn)) {
die("skip\n");
}