About fopen() for write and PHP settings
| From: | George Papatheodorou | Date: | Sun, 13 Jul 2003 18:35:43 +0000 |
| Subject: | About fopen() for write and PHP settings | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-155014@lists.php.net to get a copy of this message | ||
First of all I apology for my poor use of English of my newbish(?)
questions because I didn't find any solutions the first time I e-mailed
this list. What my problem is:
I am on a server that has these configurations like these:
http://kainga.quasarnet.org/php.php . Let's
say my username is user1 and
server files' owner is httpd . I have a script in my public html dir
that tries to fopen("./somefile.txt", "w") [note: is_writable for this
file returns false but its permissions are rw-rw-r--) but it always
fails. However, when the servers' owner changed the somefile.txt's owner
to httpd the script could write to it without any problem. Is there any
way that I can make the script write to somefile.txt without changing
its owner to httpd (I even changed the file's permissions to rwx-rwx-rwx
and it still wouldn't let the script write to it)? I really need help
with this and I hope it can be solved easily.
PS. Whatever I did PHP would return false on is_writable, which returned
true when the file's owner changed to httpd.
Thank you in advance,
Arty2