NYCPHP Meetup

NYPHP.org

[nycphp-talk] trouble running Apache w/ mod_rewrite

David Mintz dmintz at davidmintz.org
Tue Oct 12 15:19:15 EDT 2004


Anybody wanna help me figure this out? You say 'apachectl start' and it
says:

Syntax error on line 223 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/mod_rewrite.so into server:
/usr/local/apache/libexec/mod_rewrite.so: undefined symbol: dbm_fetch

This is with Apache 1.3.31 and RedHat 9 (kernel 2.4.20-31.9).

I found a web page that talks about this very issue at
http://www.vttoth.com/rewrite.htm but I can't get the fix he suggests to
work for me. He says:

<<The problem, as it turns out, is that mod_rewrite.so is compiled
incorrectly. It should be linked with a dbm library but it isn't.

If you have an up-to-date set of Apache source files, you can easily solve
this problem by manually rerunning the last compilation step of this
module, using the correct options. When you execute make mod_rewrite.so in
the appropriate directory, it performs this final step:

gcc -shared -o mod_rewrite.so mod_rewrite.lo

Rerun gcc, this time adding a reference to the GNU gdbm library:

gcc -shared -o mod_rewrite.so mod_rewrite.lo -lgdbm

Next, copy the newly created mod_rewrite.so over to
/usr/local/apache/libexec or wherever your Apache module files are
located.>>

However, there's nothing called mod_rewrite.lo to be found on my system.
Maybe there's another step that was presumed self-evident that I'm
missing.

And I can't seem to 'make mod_rewrite.so' because "make: *** No rule to
make target `mod-rewrite.so'.  Stop." (which seems reasonable even w/ my
miniscule understanding of make)

In the meantime I have commented out "LoadModule rewrite_module..." in
httpd.conf and that works, but...

Many TIA, so I can start learning to use this oh-so-cool module.

---
David Mintz
http://davidmintz.org/

        "Anybody else got a problem with Webistics?" -- Sopranos 24:17



More information about the talk mailing list