Well, the title says it all. I have a form like this in my document:
<form enctype="multipart/form-data" name="profile" method="post" action="?">
<input type="hidden" name="MAX_FILE_SIZE" value="250000">
Select image:<input type="file" name="image" />
<br />
<p class="centered">
<input value="Confirm" type="submit" class="button1 linkElement" />
</p>
</form>
The php code, that should handle the upload is standard:
move_uploaded_file($_FILES["image"]["tmp_name"], $destination);
I even printed the $_FILES array and it looks like this:
Array ( [image] => Array ( [name] => bojan.jpg [type] => image/jpeg [tmp_name] => /var/upload/phpjarPwZ [error] => 0 [size] => 10096 ) )
But the problem is that this file never gets saved to /var/upload directory (I changed php.ini file, so that uploaded files should be saved into /var/upload. I tried /var/tmp as well, but it's the same). Here are also the permissions of this dir:
drwxr-xr-x 2 apache apache 48 2010-02-17 00:30 upload
BTW, I use Mandriva 2010 64 bit distribution.
I spent last two days searching for solution on internet forums, asking people and made absolutely no progress.
Any ideas?
Oh, and is it possible to debug what is happening with the supposedly uploaded file? I mean any logs, where I could find trace, what's going wrong? I tried to check /var/log/httpd and files in there, but no success either...