| From: | nzegarra(at)kolareal(dot)net |
|---|---|
| To: | pgsql-php(at)postgresql(dot)org |
| Subject: | Re: pg_connect problem |
| Date: | 2003-09-03 18:00:21 |
| Message-ID: | 54128.200.48.62.162.1062612021.squirrel@mail.kolareal.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-php |
in your pg_hba.conf must set a line with the follow:
local all all 127.0.0.1 255.255.255.255 trust
local all all IP.OF.YOUR.MACHINE YOUR.GATEWAY trust
and in your postgresql.conf must set the port = 5432 without the comment
restart the postgresql and it must work
Regards
Nilson
> Im a PHP/PostGRE newbie. Im getting this error:
>
> Warning: pg_connect(): Unable to connect to PostgreSQL server: could not
> connect to server: Connection refused Is the server running on host
> localhost and accepting TCP/IP connections on port 5432? . in
> /export/home/tsc/a/delete-action.phtml on line 156
> Couldn't make a connection!
>
> This is the code Im trying to run:
> $connection = pg_connect("host=localhost dbname=address user=address
> password=address");
>
> This is my pg_hba.conf
> local all all password
>
> This is the output of netstat an | grep 5432
> unix 2 [ ACC ] STREAM LISTENING 27649
> /tmp/.s.PGSQL.5432
>
> Im able to do psql u address and supply and username and password as
> any
> Unix user defined in the system.
>
>
> Can anyone tell me what Im doing wrong? Thanks.
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robby Russell | 2003-09-03 18:00:40 | Re: pg_connect problem |
| Previous Message | Edric Bulalacao | 2003-09-03 17:36:14 | pg_connect problem |