note 28314 added to function.pg-connect

From: Date: Thu, 09 Jan 2003 02:03:03 +0000
Subject: note 28314 added to function.pg-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-41878@lists.php.net to get a copy of this message
when i try to connect to my postgresql db running locally on my same machine i get and error that the user is not allowed access. how do i fix that. I had it working for a while and then had to reinstall red hat 8 so i lost what i had. i have tried to mirror the exact same set-up with apache 2.0.40 and php 4.3.0 i think is what i have. i also have postgresql 7.2 i believe. php was compiled with pgsql support. here is my connection script: <?php $user = "nathan"; $dbname = "nathan"; $conn=pg_connect("user=$user dbname=$dbname"); if (!$conn) { echo ('cannot est. connection...better luck next time'); exit; } ?> it will not let me connectto the db right now with this simple script. it has worked before so i am not sure where i messed up. --Nate -- http://www.php.net/manual/en/function.pg-connect.php http://master.php.net/manage/user-notes.php?action=edit+28314 http://master.php.net/manage/user-notes.php?action=delete+28314 http://master.php.net/manage/user-notes.php?action=reject+28314

« previous php.notes (#41878) next »