Hi!  There are a few more options these days and php4.0.5 will be even
friendlier safe mode file uploading (so I hear from reliable sources.)

Through some discussion in #php , this use was proposed (by onki) :

    $tmp_name = $HTTP_POST_FILES["userfile"]["tmp_name"];

    move_uploaded_file ($tmp_name, "/home/httpd/html/upload/example.zip");

    chmod("/home/httpd/html/upload/example.zip", 0644);

And it worked!  move_uploaded_file is the key here.  Haven't personally
tried it as the safe mode server I have access to is 4.0.2 and it is a .3
function.

What I do/have done is get/got a script called chuid from here :

    http://www.srparish.net/scripts/

It must be installed by sysadmin.  Then, users do something like this :

    ... <input type="file" name="file"> ...

    passthru ("chuid $file 1033"); 
    @copy("$file", "/path/to/uploads/$file_name") 
        or die ("could not copy file $file_name");

Something like that.  The above is the users uid which can be echo'd in
shell like this :

    echo $UID


Regards,


Philip Olson
http://www.cornado.com/


               be outside the box.


On Fri, 12 Jan 2001, andreas (@work) wrote:

> hi,
> 
> we are hosting sites on a cobalt raq
> 
> we installed php4.04  ( safe_mode)
> 
> 
> how can we owners of the site allow uploads !
> 
> 
> is there a way to set
> 
> upload_temp_dir  on a site basis
> 
> if yes how
> 
> 
> thank you
> 
> andreas
> 
> 
> 
> 
> 
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to