Re: Help with pg_connect() command.
От | Riza Fahmi |
---|---|
Тема | Re: Help with pg_connect() command. |
Дата | |
Msg-id | 215930767.20030511183112@myrealbox.com обсуждение исходный текст |
Ответ на | Help with pg_connect() command. (Steve Kershaw <steve_kershaw@yahoo.com>) |
Список | pgsql-novice |
You must setting postgres to run under localhost. To do that, first you must edit pg_hba.conf under /var/lib/pgsql/data/ and find: # local all trust # host all 127.0.0.1 255.255.255.255 trust and then remove the comment('#'), and don't forget to save the file. Just that. Riza Fahmi ---Sunday, May 11, 2003, 6:20:54 AM, pgsql-novice@postgresql.org wrote: SK> Hello, SK> I'm having problems connecting to a postgre database SK> from my PHP code. The code I'm using is: SK> $conn = pg_connect("host=localhost port=5432 SK> dbname=movies ") SK> or die("Couldn't make a connection"); SK> And the warning message I get is: SK> Warning: pg_connect() unable to connect to PostgreSQL SK> server: could not connect to server: Connection SK> refused Is the server running on host localhost and SK> accepting TCP/IP connections on port 5432? in SK> /var/www/html/testpostgre.php on line 11 SK> Couldn't make a connection SK> Am I missing anything here? Thanks in advance for your SK> help. SK> Steve SK> __________________________________ SK> Do you Yahoo!? SK> The New Yahoo! Search - Faster. Easier. Bingo. SK> http://search.yahoo.com SK> ---------------------------(end of broadcast)--------------------------- SK> TIP 4: Don't 'kill -9' the postmaster
В списке pgsql-novice по дате отправления: