mod_mem_cache not loading

dcotruta
dcotruta used Ask the Experts™
on
I want to try out mod_mem_cache (although i've been warned it has problems).

On my managed server, Apache 2.2.4 was already installed, although without the mod_mem_cache.so extension.

I downloaded a clean distro of 2.2.4 from a local mirror, and used apxs to build the mod_mem_cache.c module (apxs -icA mod_mem_cache.c).

Compilation and installation went fine. When I tried uncommenting the mod_mem_cache.so LoadModule line in httpd.conf and then restarting Apache, I got the following error:

httpd: Syntax error on line 61 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_mem_cache.so into server: /usr/local/apache2/modules/mod_mem_cache.so: Undefined symbol "cache_find"

mod_cache is DEFINITELY loading before mod_mem_cache, so it's not a dependency problem. Any ideas?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
try
ldd /usr/local/apache2/modules/mod_mem_cache.so

to see if you have all required libs in place

Author

Commented:
Already tried that and it came up with this...

ldd /usr/local/apache2/modules/mod_mem_cache.so
/usr/local/apache2/modules/mod_mem_cache.so:


Top Expert 2015

Commented:
Please post output from ErrorLog telling mod_mem_cache is not loaded - error code is very important.

Author

Commented:
Nevermind - I worked it out. I was compiling the module wrong in the first place by not adding all the required dependencies.

The solution is to build the mod_mem_cache.c module like this:

apxs -icA mod_mem_cache.c cache_cache.c cache_pqueue.c cache_hash.c

Since I've answered my own question I'll be applying for a refund.
Commented:
Closed, 500 points refunded.
Vee_Mod
Community Support Moderator

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial