PDA

View Full Version : Safe Mode and Filesystem Functions


pdstein
05-26-1999, 11:56 PM
I've been playing around with some of PHPs file system functions and as I expected I ran up against safe mode restrictions.

I was hoping that once I created a directory with PHP, that PHP would have permissions to create and delete files and directories within that directory, but that apparently isn't the case.[nbsp][nbsp]I keep getting messages like this:

Warning: SAFE MODE Restriction in effect. The script whose uid is 40449 is not
allowed to access /big/dom/xusername/www/bogus/file.php owned by uid 98 in
/big/dom/xusername/www/admin/admin.php on line 173

I can't seem to delete or move the files that I've copied into the PHP-created directory and I can't create further sub-directories.[nbsp][nbsp]Is there a way to do these things or am I stuck due to safe mode?

- Paul

Justin
05-27-1999, 02:10 AM
Don't quote me, but I *think* you can chmod the directory to 777 and then have access to it. I know any files that PHP accesses has to be 777 - I was attempting to create a file manager when I ran into the problem of PHP not being able to access my home directory :(

Let me know if you are able to chmod the directory from PHP...

------------------
Justin Nelson
FutureQuest Support

pdstein
05-27-1999, 09:43 AM
Justin,

I was able to chmod 777 the directory using PHP.[nbsp][nbsp]I had to do that before I was able to copy files into it using PHP.[nbsp][nbsp]The things that I'd like to be able to do with PHP, but haven't been able to so far are
1) Delete the files I copied.
2) Create subdirectires in the directory already created by
[nbsp][nbsp] PHP.
3) Delete any subdirectories created

Do you know if there is a way to do these things or is it hopeless?

Thanks,
Paul

P.S. I created a file manager which I use frequently on my non-FQuest site (which I'm trying to move to FQuest), but they didn't install PHP in safe mode.