I've been working on this for way to long now and I can't find the solution. I have one of the most basic scripts, and a little bit of checking. When I upload the file, it opens the /tmp dir and writes the temporary file, however the filesize of that file is "0". It doesn't matter what size the original is, it won't write the file, or actually, it won't write anything into the file. Does anyone have a clue? I don't. By the way, the /tmp has 1777 mod perms. So it's not the permssions, and the folder I'm coping to has 777, so that's not it (any the sleep(5000) was added so that I could check the /tmp dir and the file to see it was even created, which that part happens, and even the copy/move happens. But it is of course 0 size also.
Thanks
John
<?PHP
if (isset($userfile))
{
if (is_uploaded_file($userfile))
{
// sleep(5000);
move_uploaded_file($userfile, "/website/newfile");
}
else
{
echo "Failed! <br>";
}
}
?>
<FORM ENCTYPE="multipart/form-data" ACTION="<?PHP $PHP_SELF; ?>" METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="20000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>