hello,
i'm trying to upload files to the server (which is on the same machine) and i used the a lot of simple scripts from php site and others.
the problem is that i get the file in the destination folder just if it is smaller then 8kb, if it's larger then i get a corrupt 8kb file .the files['xxx']['size'] is 8040 usualy no matter what the file size is (1M-10M).
the $files['xxx']['tmp_name] deleted after it had been uploaded to the server.
i got no erros on the upload.
here is my platform:
apache 1.3.1
win xp pro sp1
php 4.3.9RC2
file_uploads = On
upload_tmp_dir =
(i tried changing that but got the same result)
upload_max_filesize = 10485760
(i changed it to bytes but again the same result)
i changed the code for simplicity so it just print the files array and it always about 8040 kb max tmp file.
here is the code:
<?PHP
if (!isset($FILES['userfile'])) {
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data" method="POST" >
Send this file: <input name='userfile' type='file' />
<input type= "hidden" name="MAX_FILE_SIZE" value="10485760">
<input type="submit" value="Send File" />
</form>
<?php
}
else {
// $temp_name = $_FILES['userfile']['tmp_name'];
print "<pre>";
print_r($_FILES);
print "</pre>";
}
?>