|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-01-22 08:59 UTC] ele at roundex dot com
When uploading binary files (about 5kB and up), they get corrupted, not the whole file but some way from the beginning. The size is increased about 90%, actual number of bytes varies with different browsers. PHP versions tried: 4.3.0 and 4.3.1-dev (200301211230). Configured with './configure' '--with-apxs2' '--with-openssl' '--enable-calendar' '--with-curl' '--with-gd' '--with-jpeg-dir=/usr/lib' '--with-png-dir=/usr/lib' '--enable-mime-magic' '--with-mysql' '--enable-magic-quotes' '--with-zlib-dir=/usr/lib' '--with-config-file-path=/etc' Apache version: 2.0.43 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
The script goes like this: <html> <body> <? echo $_FILES['userfile']['name']." "; echo $_FILES['userfile']['type']." "; echo $_FILES['userfile']['size']." "; echo $_FILES['userfile']['tmp_name']." "; echo $_FILES['userfile']['error']." "; if (move_uploaded_file($_FILES['userfile']['tmp_name'], "/var/www/hosts/se8.org/htdocs/temp/image.jpg")) { echo "moved"; } else { echo "not_moved"; } ?> <p> <form action="test.php" method="post" enctype="multipart/form-data"> <input type="file" name="userfile"> <input type="submit"> </form> </body> </html> When I upload a 11463 byte image, it grows to 22575 bytes and corrutps.