Hi all!

I'm getting into trouble with my upload function.
On my local machine (winXP+Xitami) everthing works fine,
but on my remote server (guess unix) it wont (like i expected)

I've got a simple upload functionality which should store a file in a certain directory (depending on logged-in user in a different directory).

Now the script generates the following error:

Warning: copy(): SAFE MODE Restriction in effect. The script whose uid is 952 is not allowed to access /var/www/web119/html/board/userFiles/2 owned by uid 33 in [...]

I've set both the uploading script file and the directory where the file is located to the rightattribute '0777' .

The target directory is also created with

mkdir($target,0777)

I don't know what to do know, hope someone can help me out with this!

With kind regards

Hotkey

    Copy doesnt work when safe_mode is On your hosting server has safe_mode = on so you will need to use move_uploaded_file it works exactly the same as copy however its difference is it works whether safe_mode is on or off.

      You may want to SSH to your web server and see if you can issue a chmod 777 on that directory that you are attempting to move your file to.

        thanks for anwering!
        I've removed the dynamic target directory and putting all incoming files in one (previous created) directory.
        That works now...

        I ve read about the move_uploaded_file in another board and that didn't worked also there...

        -> resolved

          Write a Reply...