Posted by:
BakkerHenk
(---.adsl-surfen.hetnet.nl)
Hello all,
I have a little problem with file uploading.
I have installed wampserver 2.0.
Changed the php.ini (the correct one):
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = "e:/wamp/uploads"
; Maximum allowed size for uploaded files.
upload_max_filesize = 8M
The specified directory ("e:/wamp/uploads"
exists and is writable.
Using the code below I tried to find the error.
echo "Tempfile: ".$_FILES['uploadedfile']['tmp_name']."<Br>";
echo "Tempfile size: ".$_FILES['uploadedfile']['size']."<br>";
echo "Error: ".$_FILES['uploadedfile']['error']."<br><br>";
echo "<pre>";
print_r($_FILES);
echo "</pre>";
The output I get when uploading a file is:
Tempfile: E:\wamp\uploads\php47.tmp
Tempfile size: 156420
Error: 0
Array
(
[uploadedfile] => Array
(
[name] => tattoo2.jpg
[type] => image/pjpeg
[tmp_name] => E:\wamp\uploads\php47.tmp
[error] => 0
=> 156420
)
)
The tmp_name refers tot the directory set in the php.ini.
The problem however is that when I check the specified directory, the file is not there.
This of course causes the move_uploaded_file function to return an error.
Does someone know how to solve this problem?