Re: safe mode?

From: Date: Wed, 29 Sep 2004 20:48:32 +0000
Subject: Re: safe mode?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-198217@lists.php.net to get a copy of this message
blackwater dev wrote:
so do this each time? I need a routine that will dynamically create a folder, then use that folder to upload images. This problem doesn't exists just on one directory but on all directories dynamically created.
I mean PHP ftp functions. http://www.php.net/ftp
Thanks! On Wed, 29 Sep 2004 21:48:05 +0200, Marek Kilimajer <lists@kilimajer.net> wrote:
blackwater dev wrote:
Hello all... I finally have an upload script partly working but am not running into this problem. I have this code which executes when the user visits the image upload page: <snip> if (!file_exists("../images/property_$id")){ mkdir("../images/property_$id", 0700);} $upload_dir = "../images/property_$id"; </snip> When the user executes the script, it returns and runs this code: <snip> if($_FILES['file']['name'][$i])
         {
         $file_to_upload = $upload_dir."/".$_FILES['file']['name'][$i];
         $thisName=$_FILES['file']['name'][$i];
         move_uploaded_file($_FILES['file']['tmp_name'][$i],$file_to_upload); }
</snip> And I get these errors:: Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 1044 is not allowed to access /images/property_128873 owned by uid 1002 in /imageupload.inc.php on line 39 then a bunch of other related errors. I have tried to using 0777 also. How can I get around SAFE MODE as I can't easily change the ini file as it is on my hosts server. Thanks!
Use ftp function to create the upload directory. Login as userid 1044, create the directory, change it's permission, and you are done


« previous php.general (#198217) next »