PHP 4.0 Bug #9425 Updated: file upload appends content-type header to beginning of binary file

From: Date: Mon, 26 Feb 2001 09:21:26 +0000
Subject: PHP 4.0 Bug #9425 Updated: file upload appends content-type header to beginning of binary file
Groups: php.dev 
Request: Send a blank email to php-dev+get-47524@lists.php.net to get a copy of this message
ID: 9425 Updated by: sniper Reported By: vwallen@antlab.net Old-Status: Duplicate Status: Closed Bug Type: Unknown/Other Function Assigned To: Comments: Previous Comments: --------------------------------------------------------------------------- [2001-02-23 12:35:17] vwallen@antlab.net I've been having difficulty with the file upload feature, specifically used with JPEG files. I'm using the 4.04p|1 RPM for RH off of rpmfind, I've listed the compile flags at the end of this message. The content-type header has been appended to the beginning of the file, making the file unreadable. Opening the file in vi and deleting the first two lines fixes the problem. I've seen ~3 other messages posted relating to this problem on the mailing lists, specific to this version, but no solutions, so I'm guessing it's a bug. Here's the code on the receiving end: if ($HTTP_POST_FILES): $file1_nym = $HTTP_POST_FILES['file1_upload']['name']; move_uploaded_file($file1_upload, "/usr/local/www/html/assets/$file1_nym"); $file2_nym = $HTTP_POST_FILES['file2_upload']['name']; move_uploaded_file($file2_upload, "/usr/local/www/html/assets/$file2_nym"); } compile options: './configure' '--prefix=/usr' '--with-config-file-path=/etc' '--disable-debug' '--enable-pic' '--enable-shared' '--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs' '--with-exec-dir=/usr/bin' '--with-regex=system' '--with-gettext' '--with-gd' '--with-jpeg-dir=/usr' '--with-png' '--with-zlib' '--with-db2' '--with-db3' '--with-gdbm' '--enable-debugger' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-ftp' '--enable-wddx' '--without-mysql' '--without-oracle' '--without-oci8' '--with-xml' --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9425&edit=2

« previous php.dev (#47524) next »