PostgreSQL error with php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello All,
I’m trying to get php to connect to my PostgreSQL database.
The code that I’m using is below.


   <html><head><title>Login</title>

   </head>
   <body>
   <?php
   	$conn = "dbname=auth user=auth";
	$db = pg_connect ( $conn );
   ?>
   </body>
   </html>

Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: IDENT authentication failed for user "auth" in /var/www/html/thomas/cis166ae/database/secretdb.php on line 8

Below is how I set up my database.

root@thomas # Su – postgres

-bash-3.00$ createuser –D –A –E
		auth
-bash-3.00$ createdb auth

Thanks Helping

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux