I am trying to allow file uploads (basically I want to automate the task of my editors/members to upload an image) by using PHP and I get the following error
“Warning: open_basedir restriction in effect. File is in wrong directory in /usr/local/psa/home/vhosts/j1summer.com/httpdocs/editor/upload.php on line 68
Problem: could not move file into directory”
I think the problem is that directive "open_basedir ." has been established on the ISP. This is a security measure to restrict the access of each client to the files of another in some directory other than yours.
I think I need access to /tmp as (upload_tmp_dir is set to /tmp )
Is there some method to access this other than being granted open_basedir??
the code that throw this error is
$upfile = "../uploaded/$imageID.jpg" ;
if (!copy($userfile,$upfile))
{
echo "Problem: could not move file into directory";
exit;
}