• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1736
  • Last Modified:

Can't Login to Postgres with phpPgAdmin

I'm having great difficulty connecting to Postgres on Fedora 5 with phpPgAdmin. No matter what I do, I can't login in with the postgres user and the dbadmin user I created.

I've tried various combinations in the pg_hba.conf file, and I also made $conf['extra_login_security'] = false in the config.inc.php file in Postgres. Nothing works. I changed the passwords for the postgres and dbadmin user as well in Postgres.

I can login without problems to the database from the command line, i.e.

   su - postgres
   psql template0

Does anyone have any ideas what I'm doing wrong and I what I need to do to login?

Thanks.
0
BetaPictoris
Asked:
BetaPictoris
1 Solution
 
LuxanaCommented:
Any error message?
---------
Just in case I want to mention taht you neet to restart postreSQL after you have made changes in pg_hba.conf file.
------------
Are you sure that phpPgAdmin is configured properly?
------------
Does the webserver supports postgresql connections? ==> pg_connect
-------------
can you login using IP address?

 psql --host hostname/IPaddress template0

-----------
how about little test with just simple php script?
<?php
$conn_string = "host=yourhost port=5432 dbname=yourdatabase user=postgres password=pass";
$dbconn = pg_connect ($conn_string);

if ($dbconn ) {
echo "connected";
}

?>
----------

check postresql.conf and make sure that:
tcpip_socket = true

hope this helps..

lubo
0
 
BetaPictorisAuthor Commented:
Thanks Luxana. I made a minor change to phpPgAdmin and restarted Postgres and everything works ok.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now