Your message dated Fri, 18 Feb 2011 20:39:53 +0100
with message-id <[email protected]>
and subject line Re: Bug#295496: Please add support for UNIX domain socket in
Postgresql
has caused the Debian Bug report #295496,
regarding Please add support for UNIX domain socket in Postgresql
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
295496: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=295496
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: drupal
Version: 4.5.2-1
Severity: normal
Drupal ostensibly supports postgresql, but its use of the PEAR::DB DSN scheme
for configuration the database connection is incomplete, and cannot support
connection to a pgsql server via a UNIX domain socket, since the DSN scheme
for specifying one is not supported by PHP's parse_url() function used by
drupal to connect.
The PEAR::DB DSN scheme Drupal claims to support is described here:
http://pear.php.net/manual/en/package.database.db.intro-dsn.php
In this scheme, the syntax for specifying a connection to a pgsql domain
socket should be (I have no idea who thought this syntax was a good idea):
pgsql://username:password@unix(/var/run/postgresql)/dbname
Which is parsed by parse_sql as:
% php -r
'print_r(parse_url("pgsql://username:password@unix(/var/run/postgresql)/dbname"));'
Array
(
[scheme] => pgsql
[host] => unix(
[user] => username
[pass] => password
[path] => /var/run/postgresql)/dbname
)
However, Drupal's actual implementation is thus:
function db_connect($url) {
$url = parse_url($url);
$conn_string = ' user='. $url['user'] .' dbname='. substr($url['path'], 1)
.' password='. $url['pass'] . ' host=' . $url['host'];
$conn_string .= ($url['port']) ? ' port=' . $url['port'] : '';
$connection = pg_connect($conn_string) or die(pg_last_error());
return $connection;
}
Which leads to a $conn_string of:
" user=username dbname=var/run/postgresql)/dbname password=password host=unix("
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: sparc (sparc64)
Kernel: Linux 2.6.6
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages drupal depends on:
ii apache2-mpm-prefork [apache2] 2.0.52-3 Traditional model for Apache2
ii debconf 1.4.30.11 Debian configuration management sy
ii makepasswd 1.10-2 Generate and encrypt passwords
ii php4-cli 4:4.3.10-2 command-line interpreter for the p
ii php4-pgsql 3:4.3.9-1 PostgreSQL module for php4
ii postgresql-client 7.4.7-2 front-end programs for PostgreSQL
ii qmail [mail-transport-agent] 1.03-31 Secure, reliable, efficient, simpl
ii wwwconfig-common 0.0.42 Debian web auto configuration
-- debconf information:
* drupal/remove_backups: false
drupal/createuser_failed:
* drupal/db_auto_update: false
drupal/dropdb_failed:
drupal/upgradedb_impossible:
* drupal/dbgeneration: false
* drupal/dbtype: PostgreSQL
* drupal/database_doremove: false
drupal/createdb_failed:
* drupal/dbserver: localhost
* drupal/webserver: apache2
drupal/upgradedb_failed:
* drupal/dbname: drupal
* drupal/dbuser: drupal
drupal/dbadmin: root
drupal/initdb_failed:
drupal/conffile_failed:
--- End Message ---
--- Begin Message ---
Version: 6.18-1
Thanks Sam for checking this. I'm closing the bug.
Regards,
L
--
Luigi Gangitano -- <[email protected]> -- <[email protected]>
GPG: 1024D/924C0C26: 12F8 9C03 89D3 DB4A 9972 C24A F19B A618 924C 0C26
--- End Message ---