From: [EMAIL PROTECTED] Operating system: Linux Redhat 8.0 PHP version: 4.2.2 PHP Bug Type: Filesystem function related Bug description: Files Uploaded Using PHP almost double the size of original
I am trying to create a web-based upload/download center for our users using PHP 4.2.2 / RedHat 7.3 / Apache 2.0.40. All works well except when uploading files larger than approximately 1K. Larger files nearly double in size. For example, using the pages I am developing, a file uploaded from a win2k PC with the correct size of 700,416 bytes nearly doubles after upload to the server to 1,388,544 bytes. The file is then, of course, corrupted. This happens with all types of files (TXT, DOC, MDB, XLS, ZIP, etc). To check webserver/network functionality, I created a PERL 5.8.0 CGI script on the same webserver and uploaded the same file from the same win2k machine and file uploading works perfectly. No file size change or corruptions at all. Obviously, extra characters are being inserted somehow in the stream when using PHP, but from where and when I don't know. It may also be some type of improper CR/LF conversion during upload. I was even looking at the Character Sets defined in Apache, but the PERL 5.8.0 CGI script works correctly. Improper character translations by the Apache webserver should corrupt both PERL and PHP versions of the uploaded files shouldn't they? I am lost at this point. All help is greatly appreciated. Thanks. ########## PHP Compiled Modules ############ Running PHP 4.2.2 Zend Engine v1.2.0, Copyright (c) 1998-2002 Zend Technologies [PHP Modules] yp xml wddx sysvshm sysvsem standard sockets shmop session pspell posix pcre openssl ncurses iconv gmp gettext gd ftp exif domxml dio dbx dba curl ctype calendar bz2 bcmath zlib [Zend Modules] ########## END PHP Compiled Modules ############ ########## Apache Compiled Modules ############ Compiled in modules: core.c prefork.c http_core.c mod_so.c ########## END Apache Compiled Modules ############ NOTE: PHP compiled as dynamic module -- Edit bug report at http://bugs.php.net/?id=20963&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20963&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20963&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20963&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20963&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20963&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20963&r=support Expected behavior: http://bugs.php.net/fix.php?id=20963&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20963&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20963&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20963&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20963&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20963&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20963&r=isapi