Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am working on one project for a client who has several multisite installed in wordpress. Site is working well but I am experiencing a warning message when I click the Video link in home page.The message is shown below:

rocktron Uk

Warning: file_put_contents(cache/ecd2071956f5730430b8b710d168a85d.spc) [function.file-put-contents]: failed to open stream: Permission denied in /home/default/rktron.devstars.net/user/htdocs/simplepie.inc on line 8671
Warning: cache is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable. in /home/default/rktron.devstars.net/user/htdocs/simplepie.inc on line 1780

The code is defined in videos-page.php which is shown below:

// YouTube RSS URL via FeedBurner: http://feeds.feedburner.com/rocktron
require_once(getenv("DOCUMENT_ROOT"). '/simplepie.inc');
$feed = new SimplePie();
$feed->set_feed_url(array('http://feeds.feedburner.com/rocktron'));
$feed->enable_cache(true);
$feed->set_cache_location('cache');
$feed->set_cache_duration(1800);
$feed->init();
$feed->handle_content_type();

Everything works , video page shown, videos also play but warning message shown on top of the video page.

Any clue to solve this mystery will be really helpful.

Thanks in advance

share|improve this question

2 Answers 2

The error message states the cache is not writeable. That means you have to go check and change the permissions on the folder that is gives you in the error message.

First off, have a look at the file in /home/default/rktron.devstars.net/user/htdocs/simplepie.inc on line 1780. What does it say? What folder is it looking for?

This is all to do with simplepie on your server. It's actually noting multisite-specific.

share|improve this answer
    
Hi Andrea, Thanks for your comment. I will definitely have a look on that. –  Zakir Sajib Jan 31 '11 at 15:31

Do you have any specific reason to use externally loaded SimplePie?

WordPress comes with SimplePie bundled and has wrappers that properly integrate and set up caching for it. See fetch_feed() in Codex.

share|improve this answer
    
Hey Rarst,Thank you for your comments. Well I am actually modifying existing code of someone who just left the company! I have no idea why he used simplepie to be honest with you. The link you provided is quite helpful. Thanks once again. –  Zakir Sajib Jan 31 '11 at 15:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.