Hello, I have been having a problem on my hosted site for some time now, and I thought this would be the best place to come for answers (normally the webmasters at the host aren't very helpful). When I create a file or directory using a php script with fopen() and mkdir(), instead of creating the file under my user and group, it gives it the user/group of apache/apache, which I apparently do not have permissions in. The error message reads,
Code: Select all
Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The script whose uid is 10052 is not allowed to access /var/www/vhosts/domain/directory/ owned by uid 48 in /var/www/vhosts/domain/script.php on line 151
As if this is not troubling me enough, suddenly my fopen() doesn't create the new file automatically, giving me a "no such file or directory" error. I'm using
Code: Select all
fclose(fopen($path."adults.txt","w"));
to create the file. I don't want to read/write, so I wrap it in fclose()
As always, I would appreciate any help on this problem.
~Smudge