Thread: Cannot login using phpPgAdmin

Cannot login using phpPgAdmin

From
Archana K N
Date:

Hello,

      I am having a problem with login in phppgadmin. I can connect to postgres using pgadmin 3 (from remote system also). But when am using phppgadmin it always shows "Login Failed". I tried several ways like changing php.ini file and pg_hba.conf nothing is working.
 
Is this a problem with the phppgadmin?


regards

Re: Cannot login using phpPgAdmin

From
Devrim GÜNDÜZ
Date:
Hi,

On Sat, 2012-07-28 at 16:45 +0530, Archana K N wrote:

>       I am having a problem with login in phppgadmin. I can connect to
> postgres using pgadmin 3 (from remote system also). But when am using
> phppgadmin it always shows "*Login Failed*".

If you are trying to login with postgres user, then phpPgAdmin won't
allow you to login. Check config.php for details.

I also saw some login issues with recent PHP versions, but I did not
have time to track the issue.

Regards,
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz

Attachment

Re: Cannot login using phpPgAdmin

From
Raymond O'Donnell
Date:
On 28/07/2012 12:15, Archana K N wrote:
>
> Hello,
>
>       I am having a problem with login in phppgadmin. I can connect to
> postgres using pgadmin 3 (from remote system also). But when am using
> phppgadmin it always shows "/Login Failed/". I tried several ways like
> changing php.ini file and pg_hba.conf nothing is working.

When you logged in successfully from pgAdmin, were you using the same
username/password combination that failed in phpPgAdmin?

What do the PostgreSQL logs show?

What did you change in php.ini and pg_hba.conf?

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

Re: Cannot login using phpPgAdmin

From
Hartmut Holzgraefe
Date:
On 28.07.2012 13:57, Raymond O'Donnell wrote:

> When you logged in successfully from pgAdmin, were you using the same
> username/password combination that failed in phpPgAdmin?

and originating from the same host/interface? ...

--
hartmut


Re: Cannot login using phpPgAdmin

From
Rico Secada
Date:
On Sat, 28 Jul 2012 16:45:55 +0530
Archana K N <archanakknn@gmail.com> wrote:

> Hello,
>
>       I am having a problem with login in phppgadmin. I can connect to
> postgres using pgadmin 3 (from remote system also). But when am using
> phppgadmin it always shows "*Login Failed*". I tried several ways like
> changing php.ini file and pg_hba.conf nothing is working.
>
> Is this a problem with the phppgadmin?

I'm always having the same problem with phpPgAdmin anytime I install
it!

Here's the solution I use on Debian:

First create the file /etc/apache2/conf.d/phppgadmin:

Alias /phppgadmin /usr/share/phppgadmin/

<Directory /usr/share/phppgadmin/>
DirectoryIndex index.php

Options +FollowSymLinks
AllowOverride None

order deny,allow
deny from all
allow from 127.0.0.0/255.0.0.0 ::1/128
 allow from all

<IfModule mod_php5.c>
  php_flag magic_quotes_gpc Off
  php_flag track_vars On
  php_value include_path .
</IfModule>
</Directory>

Next, get the latest snapshot:

$ git clone git://github.com/phppgadmin/phppgadmin.git

Move the downloaded contens to /usr/share/phppgadmin

By default the “host” option is set for UNIX domain socket, you need to
change that for TCP/IP connections. In config.inc.php:

$conf['servers'][0]['desc'] = 'PostgreSQL';

// Hostname or IP address for server.  Use '' for UNIX domain socket.
// use 'localhost' for TCP/IP connection on this computer
$conf['servers'][0]['host'] = 'localhost';

// Database port on server (5432 is the PostgreSQL default)
$conf['servers'][0]['port'] = 5432;

Restart Apache:

# /etc/init.d/apache2 restart

You can now access it using: http://whatever.com/phppgadmin/

You can login using whatever account has been setup on PostgreSQL.
>
> regards

Re: Cannot login using phpPgAdmin

From
Archana K N
Date:

Hi,

      I used the same password and username while using pgadmin3. Even in the same machine the phppgadmin is not working.

 In pg_hba.conf I added the a client machine's ip address and all.


Regards

Re: Cannot login using phpPgAdmin

From
Raymond O'Donnell
Date:
On 30/07/2012 05:51, Archana K N wrote:
>
> Hi,
>
>       I used the same password and username while using pgadmin3. Even
> in the same machine the phppgadmin is not working.
>
>  In pg_hba.conf I added the a client machine's ip address and all.

As Devrim pointed out, by default phpPgAdmin doesn't let you log in as a
superuser. Would this be your problem?

Also, I think usernames and passwords may be case-sensitive; not sure
about this.

Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

Re: Cannot login using phpPgAdmin

From
Andy Anderson
Date:
Is there a % in your password? I’ve had trouble in the past with such passwords in Postgres, though I don’t recall the
exactcontext. 

-- Andy

On Jul 30, 2012, at 5:30 AM, Raymond O'Donnell wrote:

> On 30/07/2012 05:51, Archana K N wrote:
>>
>> Hi,
>>
>>      I used the same password and username while using pgadmin3. Even
>> in the same machine the phppgadmin is not working.
>>
>> In pg_hba.conf I added the a client machine's ip address and all.
>
> As Devrim pointed out, by default phpPgAdmin doesn't let you log in as a
> superuser. Would this be your problem?
>
> Also, I think usernames and passwords may be case-sensitive; not sure
> about this.
>
> Ray.
>
>
> --
> Raymond O'Donnell :: Galway :: Ireland
> rod@iol.ie
>
> --
> Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-php


Re: Cannot login using phpPgAdmin

From
Archana K N
Date:


Hi,

     No i dont have a '%' in the password. When i try to access postgres using
"http://localhost/phppgadmin" it goes to the main page to log in . But whatever I did till now am not able to log into postgres successfully.


regards

Re: Cannot login using phpPgAdmin

From
my extraidentity
Date:
Below you stated:
" In pg_hba.conf I added the a client machine's ip address and all. "

Have you tried logging into it from that specific PC that was added?

If that doesn't work, go back into pg_hba.conf and remove your edits and see if that fixes the issue.

Mark


On Jul 29, 2012, at 11:52 PM, "Archana K N" <archanakknn@gmail.com> wrote:

>
> Hi,
>
>       I used the same password and username while using pgadmin3. Even in the same machine the phppgadmin is not
working.
>
>  In pg_hba.conf I added the a client machine's ip address and all.
>
>
> Regards