You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Michael Pfannkuchen <mp...@iprobe.de> on 2006/01/11 20:41:50 UTC

[users@httpd] Apache 2.2 and mod_dbm + pgsql

Hallo,
 
I'm just trying to replace mod_auth_pgsql with the APR-DBM Module of httpd
2.2 - but - obviously - can't get the pgsql driver working.
 
Description:
When starting apache webserver (self-compiled on SuSe Linux 9.1) I get the
following error message:
>>
Syntax error on line 13 of
/usr/local/apache22/conf/vhost.gforge-iklk.de-mod_auth_dbd-pgsql.conf:
DBD: No driver for pgsql
<<

The dbm-pgsql config ...
>> ...
#Database Management

#Use the PostgreSQL driver
DBDriver pgsql

#Connection string: database name and login credentials
DBDParams "dbhost=localhost dbname=gforge user=gforge pass=xxxxx"

#Parameters for Connection Pool Management
DBDMin  1
DBDKeep 2
DBDMax  10
DBDExptime 60

<Location /netzlaufwerk/>
Options Indexes
DAV On
AuthBasicProvider dbd
# think of permissions ...!!!
# but this is only the first step
# -> real repositories have to get their special permissions for every
repository!
   AuthType Basic
   AuthName "GForge WebDAV Network Drive directory at iklk.de"

# Provider dbd setup ...
#SQL query to verify a user
#(note: DBD drivers recognise both stdio-like %s and native syntax)
#AuthDBDUserPWQuery "select password from authn where username = %s"
#AuthDBDUserRealmQuery "SELECT password FROM authn WHERE username = %s AND
realm = %s"
AuthDBDUserRealmQuery "SELECT select user_pw as password from users u join
iklk_user_group i on u.user_name=i.user_name where
 u.user_name = '%s' and i.unix_group_name='%s'"

SSLRequireSSL
SSLVerifyClient none
... <<

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

Apache compilation was done as follows ...

$$
Step 1: manually build apr and apr-util specific for this installation
(thats the trick!!!) -> and think of pgsql!!!
# Build and install apr 1.2
cd srclib/apr
./configure --prefix=/usr/local/apr-httpd/
make
make install

# Build and install apr-util 1.2
cd ../apr-util
./configure --prefix=/usr/local/apr-util-httpd/
--with-apr=/usr/local/apr-httpd/ --with-pgsql=/usr/local/pgsql
make
make install

Step 2:
"./configure" \
"--prefix=/usr/local/apache22/" \
"--with-apr=/usr/local/apr-httpd/" \
"--with-apr-util=/usr/local/apr-util-httpd/" \
"--enable-rewrite=shared" \
"--enable-ssl" \
"--enable-proxy" \
"--enable-dav" \
"--enable-info" \
"--enable-vhost-alias" \
"--enable-dbd" \
"--enable-authn-dbd" \
"$@"
make
make install
$$

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

Anyone knows how to make the dbm-pgsql driver known to Apache 2.2 ?


Thx for all help : Michael


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


AW: AW: [users@httpd] Apache 2.2 and mod_dbm + pgsql

Posted by Michael Pfannkuchen <mp...@iprobe.de>.
Hallo Nick,

thank you very much for giving the right idea - now it works :-). 

The apr-util package really doesn't contain pgsql driver. 

Fyi 2 problems to take before success:

1. When configuring apr-util, I had to set the --with-pgsql=<pgsql-dir>
Option - it's not compiled in automatically and should be noted anywhere in
Documentation.

2. The apr-util package (coming with Apache 2.2.0 Source Distribution in
subdir srclib/apr-util/ ) installed it's files to /usr/local/apr/ instead of
/usr/local/apr-util-httpd/ (although this was explicitely set on
commandline). Maybe this occured because I also installed the Apache APR
package from apache.org to /usr/local/apr _after_ the first installation of
apr-util from Apache 2.2.0 Distribution. This 2nd problem was solved by
manually overriding the prefix Option value in srclib/apr-util/Makefile
after running the ./configure command. ( prefix=/usr/local/apr-util-httpd )

For reference my successful working ./configure command-line (running in
directory <source-dir>/httpd-2.2.0/srclib/apr-util/ ): 
./configure --with-apr=/usr/local/apr-httpd --with-pgsql=/usr/local/pgsql
--with-prefix=/usr/local/apr-util-httpd

Thx again very much : Michael

P.S.: great Framework, Nick : I love your work :-)

-----Ursprüngliche Nachricht-----
Von: Nick Kew [mailto:nick@webthing.com] 
Gesendet: Freitag, 27. Januar 2006 01:28
An: users@httpd.apache.org
Betreff: Re: AW: [users@httpd] Apache 2.2 and mod_dbm + pgsql

On Thursday 26 January 2006 17:50, Michael Pfannkuchen wrote:
> Hm,
>
> Maybe I should note, my problem is not related to mod_dbm, but to 
> module mod_dbd (Apache SQL/Database Framework). After doing some more 
> investigations I'm very sure to have pgsql driver compiled into 
> apr-utils
> (apr_dbd): but how to make this known to the Apache httpd?

If it's compiled into the same apr-util your apache is using, then apache
has it.  Does "nm" on your apr-util library list a bunch of pgsql symbols?
Does "ldd" on it list libpq.so?

If apache doesn't see it, you may be best-off compiling APR and APR-Util
separately and using the --with-apr=.../etc options when building apache.
 

> Syntax error on line 13 of
> /usr/local/apache22/conf/vhost.gforge-iklk.de-mod_auth_dbd-pgsql.conf:
> DBD: No driver for pgsql

That tells me it isn't compiled into apr-util.

--
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: AW: [users@httpd] Apache 2.2 and mod_dbm + pgsql

Posted by Nick Kew <ni...@webthing.com>.
On Thursday 26 January 2006 17:50, Michael Pfannkuchen wrote:
> Hm,
>
> Maybe I should note, my problem is not related to mod_dbm, but to module
> mod_dbd (Apache SQL/Database Framework). After doing some more
> investigations I'm very sure to have pgsql driver compiled into apr-utils
> (apr_dbd): but how to make this known to the Apache httpd?

If it's compiled into the same apr-util your apache is using, then apache
has it.  Does "nm" on your apr-util library list a bunch of pgsql symbols?
Does "ldd" on it list libpq.so?

If apache doesn't see it, you may be best-off compiling APR and APR-Util
separately and using the --with-apr=.../etc options when building apache.
 

> Syntax error on line 13 of
> /usr/local/apache22/conf/vhost.gforge-iklk.de-mod_auth_dbd-pgsql.conf:
> DBD: No driver for pgsql

That tells me it isn't compiled into apr-util.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


AW: [users@httpd] Apache 2.2 and mod_dbm + pgsql

Posted by Michael Pfannkuchen <mp...@iprobe.de>.
Hm,

Maybe I should note, my problem is not related to mod_dbm, but to module
mod_dbd (Apache SQL/Database Framework). After doing some more
investigations I'm very sure to have pgsql driver compiled into apr-utils
(apr_dbd): but how to make this known to the Apache httpd? 

At the end it's running into the question: What modules should I configure
for compilation, what modules should the server load during runtime
(configuration in httpd.conf) to get Apache SQL/Database Framework with
DBDriver pgsql working?

Thx4all : Michael

-----Ursprüngliche Nachricht-----
Von: Michael Pfannkuchen [mailto:mpfannkuchen@iprobe.de] 
Gesendet: Mittwoch, 11. Januar 2006 20:42
An: users@httpd.apache.org
Betreff: [users@httpd] Apache 2.2 and mod_dbm + pgsql

Hallo,
 
I'm just trying to replace mod_auth_pgsql with the APR-DBM Module of httpd
2.2 - but - obviously - can't get the pgsql driver working.
 
Description:
When starting apache webserver (self-compiled on SuSe Linux 9.1) I get the
following error message:
>>
Syntax error on line 13 of
/usr/local/apache22/conf/vhost.gforge-iklk.de-mod_auth_dbd-pgsql.conf:
DBD: No driver for pgsql
<<

The dbm-pgsql config ...
>> ...
#Database Management

#Use the PostgreSQL driver
DBDriver pgsql

#Connection string: database name and login credentials DBDParams
"dbhost=localhost dbname=gforge user=gforge pass=xxxxx"

#Parameters for Connection Pool Management DBDMin  1 DBDKeep 2 DBDMax  10
DBDExptime 60

<Location /netzlaufwerk/>
Options Indexes
DAV On
AuthBasicProvider dbd
# think of permissions ...!!!
# but this is only the first step
# -> real repositories have to get their special permissions for every
repository!
   AuthType Basic
   AuthName "GForge WebDAV Network Drive directory at iklk.de"

# Provider dbd setup ...
#SQL query to verify a user
#(note: DBD drivers recognise both stdio-like %s and native syntax)
#AuthDBDUserPWQuery "select password from authn where username = %s"
#AuthDBDUserRealmQuery "SELECT password FROM authn WHERE username = %s AND
realm = %s"
AuthDBDUserRealmQuery "SELECT select user_pw as password from users u join
iklk_user_group i on u.user_name=i.user_name where  u.user_name = '%s' and
i.unix_group_name='%s'"

SSLRequireSSL
SSLVerifyClient none
... <<

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

Apache compilation was done as follows ...

$$
Step 1: manually build apr and apr-util specific for this installation
(thats the trick!!!) -> and think of pgsql!!!
# Build and install apr 1.2
cd srclib/apr
./configure --prefix=/usr/local/apr-httpd/ make make install

# Build and install apr-util 1.2
cd ../apr-util
./configure --prefix=/usr/local/apr-util-httpd/
--with-apr=/usr/local/apr-httpd/ --with-pgsql=/usr/local/pgsql make make
install

Step 2:
"./configure" \
"--prefix=/usr/local/apache22/" \
"--with-apr=/usr/local/apr-httpd/" \
"--with-apr-util=/usr/local/apr-util-httpd/" \ "--enable-rewrite=shared" \
"--enable-ssl" \ "--enable-proxy" \ "--enable-dav" \ "--enable-info" \
"--enable-vhost-alias" \ "--enable-dbd" \ "--enable-authn-dbd" \ "$@"
make
make install
$$

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

Anyone knows how to make the dbm-pgsql driver known to Apache 2.2 ?


Thx for all help : Michael


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org