I'm trying to write to file, but PHP tells me that it's forbidden.
I tried to change permissions, assigned files to group 'apache' (according to <?php echo whoami(); ?>
), but it didn't work.
Here is result of my file:
phpversion: 5.4.16
uname: Linux
exists // echo file_exists($file) ? ' exists' : ' does not exist', "
";
is readable // echo is_readable($file) ? ' is readable' : ' is NOT readable', "
";
is NOT writable // echo is_writable($file) ? ' is writable' : ' is NOT writable', "
";
Warning: fopen(system/cache/cache.currency.1417623063): failed to open stream: Permission denied in /var/www/html/test/test.php on line 23
last error: array(4) {
["type"]=>
int(2)
["message"]=>
string(87) "fopen(system/cache/cache.currency.1417623063): failed to open stream: Permission denied"
["file"]=>
string(30) "/var/www/html/test/test.php"
["line"]=>
int(23)
}
Can you help me, please?