Hi,
I keep getting the "permission denied" error message. Can someone help me fix this problem I am having with my PHP script
( please see below )?
I have read a few forums, and tried the suggested fixes, but still can't get it to work.
Any suggestions?
operating system:
linux 16
Version of php:
5.3.10
line of code:
fp = fopen( "$DOCUMENT_ROOT/testfile/testfile.txt", "w" );
DOCUMENT_ROOT = /var/www/html
error message:
[Tue Feb 21 01:10:49 2012] [error] [client 127.0.0.1] PHP Warning: fopen(/var/www/html/testfile/testfile.txt): failed to open stream: Permission denied in /var/www/html/processorder.php on line 108, referer:
http://localhost/orderform.html
file permission settings:
drwxr-xr-x. 21 root root 4096 Dec 15 10:14 var
drwxr-xr-x. 8 root root 4096 Dec 15 10:12 www
drwxr-xr-x. 3 root root 4096 Feb 21 01:09 html
drwxrwxrwx. 2 apache root 4096 Feb 21 01:08 testfile
-rwxrwxrwx. 1 apache root 0 Feb 20 07:59 testfile.txt