Re: Failure to connect to database using php. - Mailing list pgsql-novice

From Volkan YAZICI
Subject Re: Failure to connect to database using php.
Date
Msg-id 7104a73705062804042d200602@mail.gmail.com
Whole thread Raw
In response to Failure to connect to database using php.  (Vivek Sonny Abraham <vivek.sonny.abraham@gmail.com>)
List pgsql-novice
Hi,

On 6/28/05, Vivek Sonny Abraham <vivek.sonny.abraham@gmail.com> wrote:
> <?
>
> $db = pg_connect("dbname=friends");

Are you sure above line finishes succesfully?
Please try something with more verbosity like this:

<?php
    error_reporting(E_ALL);
    $conn = pg_connect("...") or die("Database connection failed!");
    ...
?>

For more information about handling pg_connect() errors, you can take
a look at http://php.net/pg_connect and comments related to it.

Regards.

pgsql-novice by date:

Previous
From: Vivek Sonny Abraham
Date:
Subject: Failure to connect to database using php.
Next
From: "Celia McInnis"
Date:
Subject: Re: Transactions within plpgsql functions?