Tuesday, July 20, 2010

How to resolve error referring to the text "ap_cache_cacheable_hdrs_out" when starting Apache HTTP Server

I came across a need to enable the following links for the Apache HTTP Server, in order to enable response caching. Go to /etc/apache2 folder and give the following commands.

ln -s ../mods-available/file_cache.load file_cache.load
ln -s ../mods-available/mem_cache.conf mem_cache.conf
ln -s ../mods-available/mem_cache.load mem_cache.load

Once the above links were created, I tried to restart the server and it threw the following error

* Starting web server apache2
apache2: Syntax error on line 204 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apache2/mods-enabled/mem_cache.load: Cannot load /usr/lib/apache2/modules/mod_mem_cache.so into server: /usr/lib/apache2/modules/mod_mem_cache.so: undefined symbol: ap_cache_cacheable_hdrs_out [fail]

To resolve this all I had to do was, add the following line to the apach2.conf file before # Include module configuration: section
LoadModule cache_module /usr/lib/apache2/modules/mod_cache.so

6 comments:

Unknown said...

Thank you very much, instant fix to a headache after a reinstall yesterday.

karma+

Mardala said...

Thanks! That saved me lots of time. Cheers.

Evanthika said...

Your welcome. Glad to know that the info was helpful

NiceSMS said...

It works! i live farawy from Sl .. i'm glad to see your post. keep it up..proud about you. Thanks

Evan said...

Thanks just saved me a few headaches.

Evan said...

You can do this:

ln -s ../mods-available/cache.load

instead of modifying your apache2.conf file.