I am getting the following error when I try loading one of my php pages:
[Fri Apr 08 22:59:50 2011] [error] [client ::1] PHP Warning: fopen(tracking_id.txt): failed to open stream: Permission denied in /var/www/basic.php on line 61
Line 61 is the second line from the script below:
$ourFileName = "tracking_id.txt";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fwrite($ourFileHandle, $trackingId);
fclose($ourFileHandle);
Anyone know how this can be resolved?
I am using Ubuntu as the OS, and apache as the webserver.
I used tasksel to install LAMP-server
Create a file called tracking_id.txt and execute the following command on it:
chmod a+w tracking_id.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With