Re: Failure to connect to database using php.

From: Volkan YAZICI <volkan(dot)yazici(at)gmail(dot)com>
To: Vivek Sonny Abraham <vivek(dot)sonny(dot)abraham(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Failure to connect to database using php.
Date: 2005-06-28 11:04:06
Message-ID: 7104a73705062804042d200602@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

On 6/28/05, Vivek Sonny Abraham <vivek(dot)sonny(dot)abraham(at)gmail(dot)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.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Celia McInnis 2005-06-28 14:23:24 Re: Transactions within plpgsql functions?
Previous Message Vivek Sonny Abraham 2005-06-28 10:36:21 Failure to connect to database using php.