Phppgadmin

Phppgadmin

am 12.06.2006 17:28:43 von Nabil Servais

Hello, I know it's a mailing list dedicated to postgresql but, after a
long research on the web, I found nothing good. I've got some problem
phppgadmin 3.5.2 (running with postgresql 8.0 on debian sarge). I can
connect to the database with psql and pgadmin III but when I use
phppgadmin I get "login failed".


------------------------------------------------------------ -----------


An extract of the config.inc.php:

...

// Hostname or IP address for server. Use '' for UNIX domain
socket.
$conf['servers'][0]['host'] = '';

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

// Change the default database only if you cannot connect to
template1
$conf['servers'][0]['defaultdb'] = '';

// Specify the path to the database dump utilities for this server.
// You can set these to '' if no dumper is available.
$conf['servers'][0]['pg_dump_path'] = '/usr/bin/pg_dump';
$conf['servers'][0]['pg_dumpall_path'] = '/usr/bin/pg_dumpall';


// Default language for the login screen if there's no translation
// matching user's browser request. Eg: 'english', 'polish', etc.
$conf['default_lang'] = 'english';

// If extra login security is true, then logins via phpPgAdmin
with no
// password or certain usernames (pgsql, postgres, root,
administrator)
// will be denied. Only set this false once you have read the FAQ
and
// understand how to change PostgreSQL's pg_hba.conf to enable
// passworded local connections.
$conf['extra_login_security'] = false;
...
?>


------------------------------------------------------------ -------------


of the pg_hba.conf

# Database administrative login by UNIX sockets
local all postgres ident sameuser
local all postgres md5

# TYPE DATABASE USER CIDR-ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all ident sameuser
#local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 192.168.1.0/24 trust
#host all all 192.168.1.0/24 password
# IPv6 local connections:
host all all ::1/128 md5

------------------------------------------------------------ ----------------



And postrgresql.conf

#----------------------------------------------------------- ----------------

# CONNECTIONS AND AUTHENTICATION
#----------------------------------------------------------- ----------------


# - Connection Settings -

listen_addresses = '*' # what IP interface(s) to listen on;
# defaults to localhost, '*' = any
port = 5432
max_connections = 100
# note: increasing max_connections costs about 500 bytes of shared
# memory per connection slot, in addition to costs from
shared_buffers
# and max_locks_per_transaction.
#superuser_reserved_connections = 2
unix_socket_directory = '/tmp'
#unix_socket_group = ''
#unix_socket_permissions = 0777 # octal
#rendezvous_name = '' # defaults to the computer name

# - Security & Authentication -

#authentication_timeout = 60 # 1-600, in seconds
ssl = true
#password_encryption = true
#krb_server_keyfile = ''
#db_user_namespace = false



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Re: Phppgadmin

am 12.06.2006 17:39:15 von Juan Miguel Paredes

> // Hostname or IP address for server. Use '' for UNIX domain
> socket.
> $conf['servers'][0]['host'] = '';

There you're trying to use "socket" connection (which corresponds to
"local" in pg_hba.conf:

> # "local" is for Unix domain socket connections only
> local all all ident sameuser

> #local all all md5
> # IPv4 local connections:
> host all all 127.0.0.1/32 md5
> host all all 192.168.1.0/24 trust
> #host all all 192.168.1.0/24 password
> # IPv6 local connections:
> host all all ::1/128 md5

Suggestion: try changing your phppgadmin configuration with
$conf['servers'][0]['host'] = 'localhost'; (to connect via TCP/IP), or
your pg_hba configuration for md5 or your preferred auth method on
local sockets...

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Re: Phppgadmin

am 16.06.2006 03:39:55 von Christopher Kings-Lynne

Hi Nabil,

First, I suggest using the latest version of phpPgAdmin: 4.0.

Second, your configuration seems ok, but you need to turn on logging in
your PostgreSQL to see the exact error that you're getting.

Chris

Nabil Servais wrote:
> Hello, I know it's a mailing list dedicated to postgresql but, after a
> long research on the web, I found nothing good. I've got some problem
> phppgadmin 3.5.2 (running with postgresql 8.0 on debian sarge). I can
> connect to the database with psql and pgadmin III but when I use
> phppgadmin I get "login failed".
>
>
> ------------------------------------------------------------ -----------
>
>
> An extract of the config.inc.php:
>
> > ...
>
> // Hostname or IP address for server. Use '' for UNIX domain
> socket.
> $conf['servers'][0]['host'] = '';
>
> // Database port on server (5432 is the PostgreSQL default)
> $conf['servers'][0]['port'] = 5432;
>
> // Change the default database only if you cannot connect to
> template1
> $conf['servers'][0]['defaultdb'] = '';
>
> // Specify the path to the database dump utilities for this server.
> // You can set these to '' if no dumper is available.
> $conf['servers'][0]['pg_dump_path'] = '/usr/bin/pg_dump';
> $conf['servers'][0]['pg_dumpall_path'] = '/usr/bin/pg_dumpall';
>
>
> // Default language for the login screen if there's no translation
> // matching user's browser request. Eg: 'english', 'polish', etc.
> $conf['default_lang'] = 'english';
>
> // If extra login security is true, then logins via phpPgAdmin
> with no
> // password or certain usernames (pgsql, postgres, root,
> administrator)
> // will be denied. Only set this false once you have read the FAQ and
> // understand how to change PostgreSQL's pg_hba.conf to enable
> // passworded local connections.
> $conf['extra_login_security'] = false;
> ...
> ?>
>
>
> ------------------------------------------------------------ -------------
>
>
> of the pg_hba.conf
>
> # Database administrative login by UNIX sockets
> local all postgres ident sameuser
> local all postgres md5
>
> # TYPE DATABASE USER CIDR-ADDRESS METHOD
>
> # "local" is for Unix domain socket connections only
> local all all ident sameuser
> #local all all md5
> # IPv4 local connections:
> host all all 127.0.0.1/32 md5
> host all all 192.168.1.0/24 trust
> #host all all 192.168.1.0/24 password
> # IPv6 local connections:
> host all all ::1/128 md5
>
> ------------------------------------------------------------ ----------------
>
>
>
> And postrgresql.conf
>
> #----------------------------------------------------------- ----------------
>
> # CONNECTIONS AND AUTHENTICATION
> #----------------------------------------------------------- ----------------
>
>
> # - Connection Settings -
>
> listen_addresses = '*' # what IP interface(s) to listen on;
> # defaults to localhost, '*' = any
> port = 5432
> max_connections = 100
> # note: increasing max_connections costs about 500 bytes of shared
> # memory per connection slot, in addition to costs from
> shared_buffers
> # and max_locks_per_transaction.
> #superuser_reserved_connections = 2
> unix_socket_directory = '/tmp'
> #unix_socket_group = ''
> #unix_socket_permissions = 0777 # octal
> #rendezvous_name = '' # defaults to the computer name
>
> # - Security & Authentication -
>
> #authentication_timeout = 60 # 1-600, in seconds
> ssl = true
> #password_encryption = true
> #krb_server_keyfile = ''
> #db_user_namespace = false
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

--
Christopher Kings-Lynne

Technical Manager
CalorieKing
Tel: +618.9389.8777
Fax: +618.9389.8444
chris.kings-lynne@calorieking.com
www.calorieking.com


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Re: Phppgadmin

am 16.06.2006 03:40:39 von Christopher Kings-Lynne

>> # "local" is for Unix domain socket connections only
>> local all all ident sameuser

Oh yeah, "ident sameuser" for local will NOT work with phpPgAdmin. You
need to use "md5" or something instead.

Chris


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend