|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-16 05:36 UTC] rasmus@php.net
[2004-09-16 09:41 UTC] marcus dot stolzenberg at kgrz-kassel dot de
[2004-09-17 12:27 UTC] marcus dot stolzenberg at kgrz-kassel dot de
[2004-09-28 23:05 UTC] sniper@php.net
[2004-09-29 12:13 UTC] marcus dot stolzenberg at kgrz-kassel dot de
[2004-09-29 14:55 UTC] derick@php.net
[2004-09-29 15:11 UTC] jorton@php.net
[2004-09-29 15:53 UTC] marcus dot stolzenberg at kgrz-kassel dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 23:00:01 2025 UTC |
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