A lecturer demanded that we do some homework in PHP and PostgreSQL, so I downloaded a package off the internet called "The BitNami WAPPStack" which had php, phpPgAdmin.

The problem is I have failed to access the database and I keep failing to login yet I have checked the password and its ok. am using the following:

  • username: Administrator
  • password: 123

Attempts at reading up the problem have failed. i came across some cryptic FAQs from phpPgAdmin

Login errors

Q: I always get "Login failed" even though I'm sure I'm using the right username and password.

A: There are a number of reasons why you might not be able to connect, typically having nothing to do with phpPgAdmin itself. First check the Postgres log on your server, it should contain a FATAL error message detailing the exact reason why the login is failing. You will probably need to either adjust the username or password, add LOGIN permissions to the role, or adjust your pg_hba.conf file in your Postgres data dir; so follow the directions laid out in the FATAL message.

  • you will probably need to adjust the username and password :( a've tried many times)
  • add LOGIN permissions to the role (what the heck is this geek stuff?)
  • adjust pg_hba.conf(why does a newbie have to edit any configurations?)

After several futile attempts am almost giving up.


whats the most painless way of getting php, postgresql to work (set up file prefered to building from sources) Thanks.

EDIT: Am running windows xp sp2.

  • 1
    +1 for admitting it's homework in the first line. Feb 28 '11 at 10:01
  • "What the heck is this geek stuff?" -- it's called IT. Have you considered a change of major to, say, marketing?
    – womble
    Jul 19 '11 at 21:06

There are two accounts to worry about here. You login to phpPgAdmin using the username "administator" and one password. The database itself is accessed using the username "postgres" and a second password. You should have been asked for the passwords at install time, and they can be the same. The usernames are different though, which seems like the most likely source for your problem.

Newbies have to edit the pg_hba.conf to make this easier because the installation is setup to be secure by default. You might want the simplest possible setup to install, but such a setup will leave you more vulnerable to being hacked too. BitNami has picked what they feel is a reasonable balance between security and ease of use with this two password system.

  • thanks. i had to edit login using username postgres but this was not immediately obvious to a newbie
    – Dr Deo
    Mar 1 '11 at 10:47

Well, it certainly depends on the O.S. you're using, but my preference is Linux (Debian). In Debian installing PHP, PostgreSQL and PostgreSQL support for PHP is really easy:

 sudo apt-get install php5 php5-pgsql postgresql-server

That's pretty much it. If you use another OS, I can detail the steps for that too, I think.

  • am running windows xp.
    – Dr Deo
    Feb 26 '11 at 23:11

Try the username postgres.

An alternative to a WAPP package is a WAMP package (maybe XAMPP) with a separate PostgreSQL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.