Re: Cannot login using phpPgAdmin - Mailing list pgsql-php

From Rico Secada
Subject Re: Cannot login using phpPgAdmin
Date
Msg-id 20120730002613.6dde343c@naim-work
Whole thread Raw
In response to Cannot login using phpPgAdmin  (Archana K N <archanakknn@gmail.com>)
Responses Re: Cannot login using phpPgAdmin  (Archana K N <archanakknn@gmail.com>)
List pgsql-php
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

pgsql-php by date:

Previous
From: Hartmut Holzgraefe
Date:
Subject: Re: Cannot login using phpPgAdmin
Next
From: Archana K N
Date:
Subject: Re: Cannot login using phpPgAdmin