Re: Cannot login using phpPgAdmin

From: Rico Secada <coolzone(at)it(dot)dk>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: Cannot login using phpPgAdmin
Date: 2012-07-29 22:26:13
Message-ID: 20120730002613.6dde343c@naim-work
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

On Sat, 28 Jul 2012 16:45:55 +0530
Archana K N <archanakknn(at)gmail(dot)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

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Archana K N 2012-07-30 04:51:49 Re: Cannot login using phpPgAdmin
Previous Message Hartmut Holzgraefe 2012-07-28 12:25:22 Re: Cannot login using phpPgAdmin