What to do if you get the semget() failed: Permission denied in wp-cache error

This evening I’ve been playing with the WP-cache plugin. If you install it and find this error:

semget() failed for key 0x152b: Permission denied in...

Then all you have to do is browse to the wp-cache config file which you should find in the /wp-content/ directory.

Take a copy of the file and open it to edit as follows:

change this

to this

Done. Of course you could try the WP-super-cache plugin, which is an improvement over this one – but brings a new set of potential problems. On first install my entire site started delivering blank HTML. Be careful :-)


  1. Donncha O Caoimh

    Nice tutorial on that. If you try wp-super-cache again make sure you remove wp-content/advanced-cache.php before installing the new plugin. That may have messed things up for you.

  2. John

    Hi Richard,

    Love your site! We just got this exact error message and your tutorial made getting it fixed a breeze. I’ll certainly be coming back to check out the rest of your site later.

    We are currently looking at oil rig jobs as an alternative for people who have been laid off due to the current recession.

    Keep up the great work. You’re a life saver for us non-techie types ;-)


  3. frank

    Wow thanks!!! This really helped. My site suddenly looked like a picasso. This cleaned it up. And it was a easy fix. great job

  4. Adino

    Thanks! This solved the problem for me. I had the same error message whenever I enabled wp-cache, until I removed the comment on the third line.

    My site is working again now.

  5. Rob

    Thanks! I started getting this problem on my site after running it for a long time without changes. This fixed the problem.

  6. Jim

    Hey, thanks very much for this tip. I was just about to remove the wp-cache plugin when I came across this article that fixed the issue.

    The error message I was getting was

    Warning: sem_get() [function.sem-get]: failed for key 0x152b: Permission denied in /www/wp-content/plugins/wp-cache/wp-cache-phase2.php on line 98

    All fixed now thanks to you.

    Many thanks!!