mod_rewrite.so: cannot open shared object file: No such file or directory

chris (2006-12-14 00:57:38)
4631 views
0 replies
The latest Apache 1.3.37 doesn't seem to play nice with DSO's - In a recent build I wanted mod_ssl and mod_rewrite as dso's, so configured with the following command:
$>./configure --with-layout=Apache --prefix=/usr/sbin --enable-module=rewrite --enable-shared=rewrite --enable-module=proxy --enable-shared=proxy --enable-module=ssl --enable-shared=ssl
$> make && make install

I then get this error with apachectl :
root@web-1:/usr/src/apache_1.3.37# apachectl configtest
Syntax error on line 208 of /usr/conf/httpd.conf:
Cannot load /usr/sbin/libexec/mod_rewrite.so into server: /usr/sbin/libexec/mod_rewrite.so: undefined symbol: dbm_fetch

Line 208 in the httpd.conf looks like this:
LoadModule rewrite_module     /usr/sbin/libexec/mod_rewrite.so

And to prove that the module.so is in that location:
$> updatedb && locate mod_rewrite.so
/usr/src/apache_1.3.37/src/modules/standard/mod_rewrite.so
/usr/sbin/libexec/mod_rewrite.so

Which means it was compiled and then installed to /usr/sbin/libexec/mod_rewrite.so.

So my first question is this - why does it reoort a syntax error on line 208 of the httpd.conf.
My second question is this - why is dbm_fetch undefined? If dbm is required, then the build should have linked against it at compile-time, right?

I'll see if I can compile this module myself:
$> cd /usr/src/apache_1.3.37/src/modules/standard
$> gcc -shared -o mod_rewrite.so mod_rewrite.lo -lgdbm
$> cp mod_rewrite.so  /usr/sbin/libexec/mod_rewrite.so
$> apachectl configtest
[Thu Dec 14 00:44:36 2006]
Syntax OK

And start apache?
$> apachectl stop
/usr/bin/apachectl start: httpd started
$> apachectl start
/usr/bin/apachectl start: httpd started

With that kind of mucking around required on the 1.3.x stable, I think it's probably time to try 2.x


christo
comment