note 74277 added to function.pg-connect

From: Date: Tue, 03 Apr 2007 14:06:09 +0000
Subject: note 74277 added to function.pg-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-125041@lists.php.net to get a copy of this message
"If you use pg_connect('host=localhost port=5432 user=my_username password=my_password dbname=my_dbname') and you get the following 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?" " I solved this error just by setting listen_addresses = '*' in the postgresql.conf file. This error occurs probably despite of a name resolution to localhost, given in the "host" parameter. So you can set the host in the pg_connect() function. ---- Server IP: 200.185.109.13 Probable Submitter: 200.171.100.152 (proxied: 192.168.0.174) ---- Manual Page -- http://www.php.net/manual/en/function.pg-connect.php Edit -- https://master.php.net/note/edit/74277 Del: integrated -- https://master.php.net/note/delete/74277/integrated Del: useless -- https://master.php.net/note/delete/74277/useless Del: bad code -- https://master.php.net/note/delete/74277/bad+code Del: spam -- https://master.php.net/note/delete/74277/spam Del: non-english -- https://master.php.net/note/delete/74277/non-english Del: in docs -- https://master.php.net/note/delete/74277/in+docs Del: other reasons-- https://master.php.net/note/delete/74277 Reject -- https://master.php.net/note/reject/74277 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#125041) next »