|
Posted by Gilles Ganault on 10/09/77 12:00
Hello
I'm stumped as to why PHP fails writing into a text file, with the
script being called through Apache:
==============
# pwd
/usr/local/www/data/
==============
# ll
-rwxr--r-- 1 root wheel 499 Jan 15 04:59 index.php
==============
# cat /usr/local/etc/apache/httpd.conf
User www
Group www
#BAD User root
#BAD Group wheel
==============
<?php
$fp = fopen("test.txt", "w");
fputs($fp,"First line\r\n");
fwrite($fp,"Second line\r\n");
fclose($fp);
?>
==============
http://localhost/
==============
# ll
-rwxr--r-- 1 root wheel 499 Jan 15 04:59 index.php
==============
What am I doing wrong? Is it some kind of security feature in Apache
or the OS that's preventing the script from writing the text file?
I've tried "chown www:www index.php", with no change.
Thank you.
Navigation:
[Reply to this message]
|