Fixing SimplePie “./cache is not writeable.” error

Switching from EasyPHP to XAMPP as development environment and Windows to OSX I have encounter error regarding cache file in my app based on SimplePie library.


Error looked like this:

Warning: simplePie/cache is not writeable. Make sure you’ve set the correct relative or absolute path, and that the location is server-writable. in /Applications/XAMPP/xamppfiles/htdocs/xxxxxxxxx/simplePie/library/SimplePie.php on line 1369

I browsed internet and first counter measure is to define absolute path to SimplePie cache folder from this:

$feed->set_cache_location('simplePie/cache');

to this:

$feed->set_cache_location($_SERVER['DOCUMENT_ROOT'] . '/xxxxxxxxx/simplePie/cache/');

or any other possible way to define absolute path in file.

Second counter measure is to set proper permission on folder where cache is made. I used Double Commander in OSX.

This entry was posted in Solutions and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.