2

Ehrm. I know this seems simple (as pie, har har), but I keep getting a

Warning: /cache/ is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.

Here is my situation. I have simplepie pulling in feeds from various levels and folders on my domain. So if it works in one spot, then I get this warning in others. (Such as it is in a subfolder.)

SO, I am trying to specify the actual full path location by editing line 501 on the simplepie.inc file to

var $cache_location = $_SERVER['DOCUMENT_ROOT'] . "/cache/";

BUT, this is a syntax error.....

so, A) why? I know I am missing something stupid.

and B) is there a better/more efficient way to do this?

Thanks is advance!

PaulHanak
  • 729
  • 2
  • 9
  • 21

2 Answers2

5

What about http://simplepie.org/wiki/reference/simplepie/set_cache_location ?

ilanco
  • 9,581
  • 4
  • 32
  • 37
  • Good call! I did see that, however, I would like to set it ONCE instead of setting it every time I build the calls since it will always be in the same place. – PaulHanak May 15 '12 at 18:30
  • There's currently no way to set a default cache location for all SimplePie objects, but you could symlink the cache directory if you don't want to write code. – Ryan McCue May 17 '12 at 11:03
2

create one folder in your application let suppose folder name is cache add this line to your php page. $feed->set_cache_location($_SERVER['DOCUMENT_ROOT'] . '/your application name/cache');

manoj
  • 131
  • 2
  • 8