Entry
I get 'Permission Denied' when I fopen a new file for writing, despite 777 access! Apache settings?
Mar 3rd, 2006 05:59
Harry Wood,
I'm trying a simple file writing test:
$file = "./test.txt";
$fp = fopen ("$file", "wb");
$content = "Hello, I am a File!";
fwrite($fp, $content);
fclose($fp);
The gives the permission denied error on 'fopen' line. I've done chmod
777 on the directory in which the test php script is sitting. I've also
tried swapping in a full path rather than './' No joy.
This is fresh apache installation on linux. Is there something in
httpd.conf to enable file writing?