...

View Full Version : Problem with upload script



jianneng
02-01-2003, 09:10 PM
Hi, I want to create a page which allows users to upload their photos to my server. So I used the following function: copy($photo,$uploaddir) where my $uploaddir looks something like /home/mydomain/mainwebsite_html/photos/

Now a message appears:
Warning: SAFE MODE Restriction in effect. The script whose uid is 558 is not allowed to access /home owned by uid 0 in /home/virtual/site56/fst/var/www/html/reg_form.php on line 38

I have already "CHMOD" the script and directory to 777, but still the same message appears. Can you advise me on how to correct this?

Jesh
02-02-2003, 08:55 AM
Hey

A note on the COPY function on php.net: ## move_uploaded_file Bypasses safe mode and base_dir securities (the function is totally safe, no danger) ##

Here is the function reference:
http://www.php.net/manual/en/function.move-uploaded-file.php

Note: move_uploaded_file() is not affected by the normal safe mode UID-restrictions. This is not unsafe because move_uploaded_file() only operates on files uploaded via PHP.

Hope it helps

Jesh



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum