views:

207

answers:

1

I am trying to create a simple RSS parser using the two frameworks. However I am getting PHPerrors when trying to write to my cache directory:

set_cache_location(APPPATH.'cache/rss');

I am running windows 7 with XAMPP using the latest version of Simplepie from github

error:

A PHP Error was encountered

Severity: User Warning

Message: C:\xampp\htdocs\geekurls/system/application/cache/rss 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: 1732

Tried like the below comment said and tried making a test file but to no luck

        $file = APPPATH."cache/rss/testFile.txt";
        $handle = fopen($file, 'w') or die("fail");
        fclose($handle);
+1  A: 

A simple checks to find out what might be happening,

Try creating a file in this directory using standard php - this could help solve permission problems.

$this->load->helper('file'); 

$data = 'Some file data';

if ( ! write_file('./path/to/file.php', $data))
{
     echo 'Unable to write the file';
}
else
{
     echo 'File written!';
}

Also how about using the default cache?

http://simplepie.org/wiki/faq/i_m_getting_cache_error_messages

Kieran Andrews
No luck so far :( thanks though -even when using the default cache location :(
Malachi
Did writing the file fail? Have you tried the CI way of writing a file?
Kieran Andrews
Yeah it did - must be something to do with permissions to that directory :( I can write to my own user area - but xampp htdocs is installed to c:\xampp so that probably is the issue
Malachi
Right click on the folder (cache), select properties, select security and check the settings in there. Typically Administrator has Write and User only has read, depending on your Windows setup this could be the problem.
Kieran Andrews