blob: 34e93b2aaaad6cfbc37e3dea4c20639dd608f34c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
// This script prints "skip" unless:
// * the pgsql extension is built-in or loadable, AND
// * there is a database called "test" accessible
// 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($conn_str);
if (!is_resource($conn)) {
die("skip\n");
}
?>
|