Package: dbconfig-common
Version: 1.8.39
Severity: normal
I'm trying to use dbconfig-common to package a postgresql application
with a web interface (http://voiceroute.org). As it will run from the
web server, password authentication seems to be called for.
I use the following php snippet in the application to include the
dbconfig-common -generated data:
require_once '/etc/druid/debian-db.php';
$conn_str = '';
if ($dbserver != '') { $conn_str = $conn_str."host=$dbserver "; }
if ($dbport != '' ) { $conn_str = $conn_str."port=$dbport "; }
if ($dbname != '' ) { $conn_str = $conn_str."dbname=$dbname "; }
if ($dbuser != '' ) { $conn_str = $conn_str."user=$dbuser "; }
if ($dbpass != '' ) { $conn_str = $conn_str."password=$dbpass "; }
$this->connection_hndl = pg_connect( $conn_str);
The data in the file was:
$dbuser='druid';
$dbpass='WdcpDFBp5jqk';
$basepath='';
$dbname='druid';
$dbserver='';
$dbport='';
$dbtype='pgsql';
When I try to use this, I fail to connect. The reason is that I connect
through the unix domain socket, and the default Debian configuration
seems to only allow ident connections there:
# egrep -v '^(#|$)' /etc/postgresql/8.3/main/pg_hba.conf
local all postgres ident sameuser
local all all ident sameuser
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
Workaround: manually edit $dbserver to 'localhost'.
sed -i -e "/dbserver=/s/=''/='localhost'/" /etc/druid/debian-db.php
(which is probably wrong and I figure ucf doesn't like it)
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=he_IL.UTF-8, LC_CTYPE=he_IL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages dbconfig-common depends on:
ii debconf [debconf-2.0] 1.5.24 Debian configuration management sy
ii ucf 3.0011 Update Configuration File: preserv
dbconfig-common recommends no packages.
Versions of packages dbconfig-common suggests:
ii postgresql-client-8.3 [postgr 8.3.5-1 front-end programs for PostgreSQL
-- debconf information:
dbconfig-common/remote-questions-default: false
dbconfig-common/pgsql/revertconf: false
dbconfig-common/internal/skip-preseed: false
dbconfig-common/db/dbname:
dbconfig-common/pgsql/manualconf:
dbconfig-common/dbconfig-remove: true
dbconfig-common/mysql/method: unix socket
dbconfig-common/upgrade-backup: true
dbconfig-common/pgsql/authmethod-admin: ident
dbconfig-common/upgrade-error: abort
dbconfig-common/purge: false
dbconfig-common/db/basepath:
dbconfig-common/install-error: abort
dbconfig-common/pgsql/no-empty-passwords:
dbconfig-common/pgsql/admin-user: postgres
dbconfig-common/dbconfig-install: true
dbconfig-common/dbconfig-reinstall: false
dbconfig-common/remote/host:
dbconfig-common/pgsql/changeconf: false
dbconfig-common/remote/newhost:
dbconfig-common/missing-db-package-error: abort
dbconfig-common/dbconfig-upgrade: true
dbconfig-common/pgsql/no-user-choose-other-method:
dbconfig-common/internal/reconfiguring: false
dbconfig-common/passwords-do-not-match:
dbconfig-common/remove-error: abort
dbconfig-common/remember-admin-pass: false
dbconfig-common/mysql/admin-user: root
dbconfig-common/pgsql/method: unix socket
dbconfig-common/pgsql/authmethod-user:
dbconfig-common/database-type:
dbconfig-common/db/app-user:
dbconfig-common/remote/port:
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]