View Full Version : php safe_mode and uploading

05-08-2006, 02:06 AM
is it possible to upload files via http into directories created by php while in safe_mode?
cause ive made a webpage where admin creates a fotoalbum and an appropriate directory is created by php where all the album photos should be stored.
the problem is that as soon as i try to upload a photo into this directory, move_uploaded_file returns error such as "script whose uid is 1000 cannot access /dir/dir/dir whose uid is 33.." which is weird as that /dir/dir/dir has been created by the same script couple of second before.
when i try to upload files into directories created manually, it works fine.
any ideas how to solve this?
thanks in advance.

05-08-2006, 06:14 AM
Yes, it is possible to upload via a webpage in safe mode. Make sure the directory you are uploading too is chmod to 777.

05-08-2006, 01:18 PM
You can also use copy instead of move_uploaded_file.

06-06-2006, 10:07 AM
copy or move_uploaded_file does not have affect on safe_mode restrictions.

use move_uploaded_file, because it do some security checks.