Menu

login failed

Help
2007-01-23
2013-06-11
  • Nobody/Anonymous

    I am receiving the login failed message. I double checked the pg_hba.conf file and cannot see any problem.  I have phppgadmin installed on the same server as my postgresql install. I am able run simple web php script to connect and query the database. I am also to login into the shell client with user/pass. This is the line from pg_hba.conf I think should work to allow phppgadmin access:
    host            all     all     127.0.0.1       255.255.255.255         md5

    I also have checked my log files. I don't see any log messages when using phppgadmin. Although I can verify the log is working because I can see messages when I use my php script or local shell client. But there is nothing from phppgadmin. When I can't login it comes back so quickly it doesn't even seem that it tried....

    any help would be greatly appreciated.

    Thank you,
    Andrew

     
    • Nobody/Anonymous

      If got the same problem.
      With PostgreSQL 8.2 the tcpip_socket parameter in the postgresql.conf file doesn't work anymore. But the listen_addresses parameter also had no effect. Stil "login failed".
      I have tried all the solutions mentioned in de FAQ, but no effect.

      Has anybody a solution/work around?

      Thanks,
      Marco

       
    • Nobody/Anonymous

      Same problem here... I have two servers, one with "md5", the other one with "trust", both fail.  I tried Unix sock and tcp/ip localhost.  Same result. 

      I turned on postgres debugging, no phppgadmin related info showed up.

      $conf['extra_login_security'] = false;

      This only happens on version 4.1.  I tried version 3.5.x, it works just fine.

      Please help.  Thanks!

       
    • javier wilson

      javier wilson - 2007-01-26

      which version of postgresql do you have? i have this problem when i use phppgadmin 4.1 with postgresl 8.2.1 but no with postgresql 8.1.
      also theres is problem with classes/database/Postgres81.php and classes/database/Postgres82.php

      line 86 reads: $clause = " AND pu.usename='{$username}'";

      but should read: $clause = " AND pr.rolname='{$username}'";

       
      • javier wilson

        javier wilson - 2007-01-26

        it seems like phppgadmin tries to connect to template1, and get:

        psql: FATAL:  permission denied for database "template1"
        DETAIL:  User does not have CONNECT privilege.

         
      • Nobody/Anonymous

        I'm trying too use phppgadmin 4.1 with postgresql 8.2.1.

        I change the line Javier suggested in the Postgres82.php file but that had no effect, sadly.
        Still searching...

        Marco

         
    • Nobody/Anonymous

      Encountered this error too Please help............ searching to a web have no luck for answer :(

      Macoy

       
    • Robert Treat

      Robert Treat - 2007-02-02

      It's worth pointing out that at least some of you are having different troubles than the others (the OP for instance was not running on 8.2)

      Also if you look on the demo server you can log in to the 8.2 instance, and all of it is pretty default, so that should work.

      For Javier, I would suggest either changing the defaultdb parameter in the phppgadmin conf file, or granting access to template1 for your user.

      For Marco, we need some more information... which user are you trying to connect with? what error message do you see in your postgresql.conf?

       
    • Nobody/Anonymous

      I have the same problem with postgres 7.2.1 + PgAdmin 4.1
      and i'm 100% sure the config is ok since I can connect with pgsql -h <host> -U ....

      will try to downgrade PgAdmin.

       
      • Robert Treat

        Robert Treat - 2007-02-07

        um? pgadmin?  do you mean phppgadmin?  they are different.   also just becuase you can log in with psql doesn't mean that you can log in with phppgadmin, for instance phppgadmin runs as your web server user in the operating system, so unless your logging in as "nobody" (or whoever your webserver runs as) connecting via psql is not the same thing neccessarily. Better information would be what error does phppgadmin give you, and what error do you see in your postgresql logs when you connection fails?

        oh, and 7.2.1 is ancient man! not to mention unsupported by the postgresql developers... you really ought to upgrade.

         
    • Nobody/Anonymous

      of course I mean phpPgAdmin
      and yes i log from a different server with a different user to the postgresql server manually
      to be precise :
      # su - nobody
      nobody@xxx:~$ psql -h yyy -U zzz -d xxx
      Password:
      Welcome to psql, the PostgreSQL interactive terminal.

      Type:  \copyright for distribution terms
             \h for help with SQL commands
             \? for help on internal slash commands
             \g or terminate with semicolon to execute query
             \q to quit

      xxx=>
      SUCCESS!

      but phpPgAdmin fails with message no other message than 'login failed'
      and apparently it doesnt even try to connect to the postgresql server (nothing logged and tcpdump just told me) so I guess it's not postgres fault.

      I know 7.2 is way too old, but that's a requirement here, and it's advertised to work, no ?
      if not, i will reconsider.

       
      • Nobody/Anonymous

        It works with phpPgAdmin 4.0 so I guess a problem was introduced in 4.1
        I can't find where though

         
      • Robert Treat

        Robert Treat - 2007-02-09

        > of course I mean phpPgAdmin

        :-)

        > and yes i log from a different server with a different user to the
        > postgresql server manually
        > to be precise :
        > # su - nobody
        > nobody@xxx:~$ psql -h yyy -U zzz -d xxx
        > Password:
        > Welcome to psql, the PostgreSQL interactive terminal.

        Interesting. Does it work if you set the defaultdb param in phppgadmin to xxx ?

        > but phpPgAdmin fails with message no other message than 'login failed'
        > and apparently it doesnt even try to connect to the postgresql server
        > (nothing logged and tcpdump just told me) so I guess it's not postgres
        > fault.

        Your sure it's a login failed and not the super user security failure? (doesnt sound like it, but worth verifying).  Try removing the @ in libraries/adodb/drivers/adodb-postgres64.inc.php round line 655 and see if you can get a better error message from php. 

        > I know 7.2 is way too old, but that's a requirement here, and it's
        > advertised to work, no ?
        > if not, i will reconsider.

        It's advertised to work only because I don't know of any reason why it wouldn't work, but I don't have a 7.2 to test against (couldn't get it to run on recent slackware). Given 7.2 is not support by the postgresql developers...

        > It works with phpPgAdmin 4.0 so I guess a problem was introduced in 4.1
        > I can't find where though

        Hmm... the two suspicious items that jump out are the change to send encrypted passwords and support for ssl. You might be able to dig around there and find something, but getting a better error message from php would probably be more helpful.

         
    • Nobody/Anonymous

      When I remove the @ in libraries/adodb/drivers/adodb-postgres64.inc.php on line 655 I get the following error:

      Warning: pg_connect(): Unable to connect to PostgreSQL server: could not create socket: An address incompatible with the requested protocol was used. (0x0000273F) . in ..\libraries\adodb\drivers\adodb-postgres64.inc.php on line 655

      Question is: why couldn't it create a socket?? Address incompatible with the requested protocol???

      Marco

       
    • Nobody/Anonymous

      Okay, I found an answer.

      In the config file there is a line: $conf['servers'][0]['sslmode'] = 'allow';
      I had to set the sslmode to: $conf['servers'][0]['sslmode'] = ''; to make it work.
      I can't explain it, but is works.

      I hope this helps some of you too.

      Marco

       
    • Nobody/Anonymous

      Ok! Thanks!!

      Felipe

       
    • Patrick Coleman

      Patrick Coleman - 2007-03-07

      What config file is "sslmode" in?

      I see in the "TODO" file a line that says "Add sslmode to connection variables"

      Pat

       
    • Robert Treat

      Robert Treat - 2007-03-07

      look in conf/config.inc.php in your phppgadmin directory

       
    • javier wilson

      javier wilson - 2007-04-02

      I got login failed on any server with postgres 8.2.x

      I finally solved this, I entered: GRANT CONNECT ON DATABASE template1 TO public;
      on the server I was trying to connect to. I starting getting this problem with
      postgresql 8.2.x and phppgadmin 4.1.x, maybe the upgrade process was the problem,
      I don't know.

       
    • Nobody/Anonymous

      Hi,

      I am having a very peculiar problem. We have two identical servers. What I mean is the have the same hardware resources and have the same operating system (SLES 10). I installed on postgres 8.1.4 on both machines and phpPgAdmin 4.1.2. Both have the same data and same users with the same passwords. One machine acts as stand by. On one machine (othello), I was able to login using phpPgAdmin and do all the usual stuff. But on the standby machine (hector), when I tried to login using phpPgAdmin I am getting simple "Login failed" message. There is no entry about this failed login in logs.

      So, as you suggested in one of the messages above removed the @ in libraries/adodb/drivers/adodb-postgres64.inc.php to get more info. But there is no change in situation. I even copied the pg_hba.conf and config.inc.php from othello to hector and tried again. But it is till the same. I also checked all the php and postgres packages on both machines, they are the same ones. This is really puzzling and have no clue anymore where else to look.

      Any help is highly appreciated.

      Cheers,
      Samatha

       

Log in to post a comment.