connect to pg working

This commit is contained in:
Brenda Wallace 2009-06-23 17:43:46 +12:00
parent 3fe182e865
commit 343e2010ae

View File

@ -204,10 +204,10 @@ function handlePost()
$fail = true; $fail = true;
} }
if (empty($password)) { // if (empty($password)) {
updateStatus("No password specified.", true); // updateStatus("No password specified.", true);
$fail = true; // $fail = true;
} // }
if (empty($sitename)) { if (empty($sitename)) {
updateStatus("No sitename specified.", true); updateStatus("No sitename specified.", true);
@ -234,7 +234,16 @@ function handlePost()
} }
function pgsql_db_installer($host, $database, $username, $password, $sitename) { function pgsql_db_installer($host, $database, $username, $password, $sitename) {
echo 'TODO'; exit; $connstring = "dbname=$database host=$host user=$username";
//No password would mean trust authentication used.
if (!empty($password)) {
$connstring .= " password=$password";
}
updateStatus("Starting installation...");
updateStatus("Checking database...");
$conn = pg_connect($connstring);
} }
function mysql_db_installer($host, $database, $username, $password, $sitename) { function mysql_db_installer($host, $database, $username, $password, $sitename) {