Hi All,
I'm battling to connect to my Database using the ff method::
<?
$user="romeom";
$dbname="employees";
$conn=pg_connect("user=$user dbname=$dbname");
if (!$conn) {
echo "No Connection";
} else {
echo "Connection Established";
}
?>
When I run in konsole using php <filename.php> it says Connection Established,
But in http://localhost/test.php, it does not establish the connection.
The error message is:
Unable to connect to Postgresql server:FATAL 1: IDENT authentication failed for user "romeom" in
<b>/var/www/html/test.php</b> on line 4
Connection Failed.
What am I doing wrong?undefinedundefined
PostgreSQL connection Fails
Moderator: General Moderators
- Love_Daddy
- Forum Commoner
- Posts: 61
- Joined: Wed Jul 10, 2002 6:55 am
- Location: South Africa
- Contact: