Apache 2.2 and Postgres

Clement Laforet sheepkiller at cultdeadsheep.org
Sat Aug 19 11:25:22 UTC 2006

Hi Alan,
On Thu, Aug 17, 2006 at 02:24:31PM -0700, alan bryan wrote:
> Hi,
> I'm trying to get Apache 2.2 and Postgres to work together so that I
> can use mod_authn_dbd.
> I think the problem is that APR is not being passed the correct
> arguments so that it configures with PGSQL support.
> # ldd /usr/local/libexec/apache22/mod_authn_dbd.so
> /usr/local/libexec/apache22/mod_authn_dbd.so:
> # ldd /usr/local/libexec/apache22/mod_dbd.so
> /usr/local/libexec/apache22/mod_dbd.so:
> Shouldn't there be various pgsql things listed here?
No. dbd relies on apr-util.

mod_authn_dbd -> mod_dbd -> libaprutil.so.

> I compiled ports/apache22 with WITH_PGSQL=yes and also tried
> WITH_PGSQL=/usr/local/pgsql with no changes in result.  Am I doing
> something wrong here?
No, except WITH_PGSQL is just a flag, you can't pass a customized 
path to WITH_PGSQL (it uses bsd.databases.mk). 

I don't use pgsql and I tested with gforge sample config file:
here what I got:
# make WITH_PGSQL=yes install clean
<build and install cleanly>
## ldd /usr/local/lib/libaprutil-1.so    
        libpq.so.3 => /usr/local/lib/libpq.so.3 (0x8817b000)
        libexpat.so.6 => /usr/local/lib/libexpat.so.6 (0x88237000)
        libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x88255000)
        libapr-1.so.2 => /usr/local/lib/libapr-1.so.2 (0x88342000)
        libcrypt.so.3 => /lib/libcrypt.so.3 (0x88362000)
        libpthread.so.2 => /usr/lib/libpthread.so.2 (0x8837a000)
        libintl.so.6 => /usr/local/lib/libintl.so.6 (0x8839f000)
        libssl.so.4 => /usr/lib/libssl.so.4 (0x883a8000)
        libcrypto.so.4 => /lib/libcrypto.so.4 (0x883d6000)
        libm.so.4 => /lib/libm.so.4 (0x884c9000)
        libz.so.3 => /lib/libz.so.3 (0x884df000)
#cat /usr/local/etc/apache22/Includes/pg.conf 
DBDriver pgsql
DBDParams "dbhost=localhost dbname=gforge user=gforge pass=xxxxx"
DBDMin 1
DBDKeep 2
DBDMax 10
DBDExptime 60

# grep _dbd /usr/local/etc/apache22/httpd.conf 
LoadModule authn_dbd_module libexec/apache22/mod_authn_dbd.so
LoadModule dbd_module libexec/apache22/mod_dbd.so

# /usr/local/etc/rc.d/apache22.sh restart
# grep DBD /var/log/httpd-error.log| head -2
[Sat Aug 19 13:20:25 2006] [crit] (20014)Internal error: DBD: Can't connect to pgsql
[Sat Aug 19 13:20:25 2006] [crit] (20014)Internal error: DBD: failed to initialise

Driver is found.
Please ensure you have all modules activated. When reinstalling 
apache, LoadModule list isn't updated if httpd.conf exists.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20060819/ebd2b691/attachment.pgp

More information about the freebsd-ports mailing list