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:

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

    karma+

    ReplyDelete
  2. Thanks! That saved me lots of time. Cheers.

    ReplyDelete
  3. Your welcome. Glad to know that the info was helpful

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

    ReplyDelete
  5. Thanks just saved me a few headaches.

    ReplyDelete
  6. You can do this:

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

    instead of modifying your apache2.conf file.

    ReplyDelete