Re: Accessing Postgres db from apache using PHP - Mailing list pgsql-novice

From bruce
Subject Re: Accessing Postgres db from apache using PHP
Date
Msg-id 003b01c35525$cf5dfca0$0301a8c0@Mesa.com
Whole thread Raw
In response to Re: Accessing Postgres db from apache using PHP  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
List pgsql-novice
hi....

I just searched my drive... I find the following files:
    postgresql
    postgres.conf.sample

I do not find a file --> postgres.conf

Where should it be/reside.... The information in the postgres.conf.sample
has the tcpip_socket parameter !!!

This might be the issue!!!!!!!!!!!!

Thanks

Bruce
bedouglas@earthlink.net


-----Original Message-----
From: pgsql-novice-owner@postgresql.org
[mailto:pgsql-novice-owner@postgresql.org]On Behalf Of Jean-Christian
Imbeault
Sent: Monday, July 28, 2003 12:21 AM
To: christoph.dellavalle@goetheanum.ch; pgsql-novice
Subject: Re: [NOVICE] Accessing Postgres db from apache using PHP


>i then do a:
>    $tmp = "host=localhost dbname=gforge user=gforge
>password=gforge";
>    $conn = @pg_connect($tmp);


Just jumping in here but don't you need to specify the port?

$conn = pg_connect("host=localhost port=5432 dbname=gforge user=gforge");

Also, don't use the @, that way you can see any useful error messages
that are displayed :)

Oh, and you did change the conf file to let postgres use TCP/IP?

tcpip_socket = true
port=5432

Jc



---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


pgsql-novice by date:

Previous
From: Jean-Christian Imbeault
Date:
Subject: Re: Accessing Postgres db from apache using PHP
Next
From: Bruno Wolff III
Date:
Subject: Re: Where's The Primary Key?