Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PHP] Cannot login using phpPgAdmin

35 views
Skip to first unread message

Archana K N

unread,
Jul 28, 2012, 7:15:55 AM7/28/12
to

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

Devrim GÜNDÜZ

unread,
Jul 28, 2012, 7:54:26 AM7/28/12
to

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
signature.asc

Raymond O'Donnell

unread,
Jul 28, 2012, 7:57:58 AM7/28/12
to
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
r...@iol.ie

--
Sent via pgsql-php mailing list (pgsq...@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php

Hartmut Holzgraefe

unread,
Jul 28, 2012, 8:25:22 AM7/28/12
to
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

Rico Secada

unread,
Jul 29, 2012, 6:26:13 PM7/29/12
to
On Sat, 28 Jul 2012 16:45:55 +0530
Archana K N <archa...@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

Archana K N

unread,
Jul 30, 2012, 12:51:49 AM7/30/12
to

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

Raymond O'Donnell

unread,
Jul 30, 2012, 5:30:57 AM7/30/12
to
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
r...@iol.ie

Archana K N

unread,
Jul 30, 2012, 7:01:50 AM7/30/12
to


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

my extraidentity

unread,
Aug 1, 2012, 9:18:55 PM8/1/12
to
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
0 new messages