0
votes

I am using Simplepie on XAMPP.

I get the following error.

Severity: User Warning Message: C:\xampp\htdocs\Myapp/system/cache/simplepie/ is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable. Filename: libraries/Simplepie.php Line Number: 2040

Since it is xampp it does not matter if it is writable or not, because it is always writable on xampp.

But I think C:\xampp\htdocs\Myapp/system/cache/simplepie/ is the problem.

I don't have any problem with Ubuntu though, and I wish to continue using Xampp.

2
Ubuntu? what's with that? You're under windows..Anyway, the problem is most likely the path, did you check it's actually that? check directory separators also (though it shouldn't matter) - Damien Pirsy

2 Answers

2
votes

I encountered the same problem on simplepie on PHP5 ON WINDOWS and fixed it as follows:

1) First thing's first. You must make sure that the path exists and it is writeable:

file_put_contents('C:\\xampp\\htdocs\\Myapp\\system\\cache\\simplepie\\', 'test');

2) If this works then you can just go ahead the edit the simplepie.inc file. Make a backup of that file first. Now locate the line that says:

if (file_exists($this->name) && is_writeable($this->name) || file_exists($this->location) && is_writeable($this->location))

Comment out the && is_writeable($this->location) portion like this:

if (file_exists($this->name) && is_writeable($this->name) || file_exists($this->location) /*&& is_writeable($this->location)*/)
0
votes

After reading Salman A, I realized that I need to add simplepie_cache_dir

// Set the location for simplepie cache
$config['simplepie_cache_dir'] = BASEPATH . 'cache/simplepie/';