ID: 30093
Updated by: [EMAIL PROTECTED]
Reported By: marcus dot stolzenberg at kgrz-kassel dot de
Status: Open
Bug Type: *General Issues
Operating System: SLES 8.0 zSeries s390 IBM
PHP Version: 4.3.9RC3
New Comment:
I just updated one of my servers to PHP_4_3 HEAD and large image file
uploads are working fine both single and multiple at a time.
Are we really talking about an S390 here?
Previous Comments:
------------------------------------------------------------------------
[2004-09-15 15:58:17] marcus dot stolzenberg at kgrz-kassel dot de
Description:
------------
Hello,
First the 'error' is also in 4.3.9rc1 with 4.3.6 everything is fine.
If I am going to upload a file using php which is not txt encoded the
file size of the transfered file is more then doubble and the file
stored on the server is corrupted.
Reproduce code:
---------------
1. HTML Part:
<form enctype="multipart/form-data" action="upload.php" method="post">
<input type="file" name="file"><br>
<input type="submit" value="upload">
</form>
2. PHP Part:
$tempname = $_FILES['file']['tmp_name'];
$name = $_FILES['file']['name'];
$type = $_FILES['file']['type'];
$size = $_FILES['file']['size'];
...
print_r($_FILES);
echo $size;
copy("$tempname", "/upload/$name");
...
Expected result:
----------------
Output useing 4.3.6
Array ( [file] => Array ( [name] => daemon347.exe [type] =>
application/octet-stream [tmp_name] => /uploadkds/phpJGle3P [error] =>
0 [size] => 504320 ) ) Array ( )
504320
504320 = filesize of desination file on the server = original file
size
Actual result:
--------------
Output 4.3.9rc1 and 4.3.9rc3
Array ( [file] => Array ( [name] => daemon347.exe [type] =>
application/octet-stream [tmp_name] => /uploadkds/phplvCHls [error] =>
0 [size] => 1004032 ) ) Array ( )
1004032
1004032 = filesize of desination file on the server =! original size
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30093&edit=1