dingleberry
Programmer
Hi, I've got a problem with a copy function I'm hoping someone out there has seen before.
I'm running an uploading script (or attempting to)
$upfile = "/home/theorangestudio/uploads/".$userfile_name;
if ( !copy($userfile, $upfile))
{
echo "Problem: Could not move file into directory $upfile";
exit;
}
and needless to say, I keep getting the problem could not move.... error.
I've declared my upload_tmp_dir = "/home/uploads/" in php.ini and enabled http uploads as well as set max size to 2M. I then set the /home/uploads permissions to 777 and also the $upfile directory permissions to 777. Still, not getting the copy function to work. I believe the file is uploading to temp directory, but copy is where the problem is. Do I have to give ownership of either /home/uploads or $upfile to nobody or something? Currently they're owned by my account (not root -- but I do have root access if I need it).
This is a shared hosting environment. Any ideas?
Thanks,
dan
I'm running an uploading script (or attempting to)
$upfile = "/home/theorangestudio/uploads/".$userfile_name;
if ( !copy($userfile, $upfile))
{
echo "Problem: Could not move file into directory $upfile";
exit;
}
and needless to say, I keep getting the problem could not move.... error.
I've declared my upload_tmp_dir = "/home/uploads/" in php.ini and enabled http uploads as well as set max size to 2M. I then set the /home/uploads permissions to 777 and also the $upfile directory permissions to 777. Still, not getting the copy function to work. I believe the file is uploading to temp directory, but copy is where the problem is. Do I have to give ownership of either /home/uploads or $upfile to nobody or something? Currently they're owned by my account (not root -- but I do have root access if I need it).
This is a shared hosting environment. Any ideas?
Thanks,
dan