Ask a Question related to PHP Development, Design and Development.
-
ivan at artenergy dot com #1
#24574 [NEW]: File corruption during file upload
From: ivan at artenergy dot com
Operating system: FreeBSD 4.7/Apache1.3.27
PHP version: 4.3.2
PHP Bug Type: Filesystem function related
Bug description: File corruption during file upload
Description:
------------
Uploading files, e.g. JPGs or GIFs, using HTML form/PHP interface results
in corrupted files.
Reproduce code:
---------------
HTML form fragment:
....
<form method="post" enctype="multipart/form-data"
action="update.php"><input type="file" name="image">
.....
update.php fragment:
....
copy("$image", "/www/image/$image_name") or die("Couldn't upload
$image_name !");
....
Expected result:
----------------
Selected local file uploaded to the web server as
"/www/image/$image_name"
Actual result:
--------------
File is indeed uploaded, file length is correct, but it is
corrupted.
Typically all 0x00 bytes are replaced with 0x20.
--
Edit bug report at [url]http://bugs.php.net/?id=24574&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=24574&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=24574&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=24574&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=24574&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=24574&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=24574&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=24574&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=24574&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=24574&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=24574&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=24574&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=24574&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=24574&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=24574&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=24574&r=gnused[/url]
ivan at artenergy dot com Guest
-
LWP - multipart/form-data file upload from scalar rather than local file
I'm looking to do an HTTP upload, preferably with HTTP::Request::Common, but get the file data from either a filehandle or a scalar rather than... -
PS 8 File Corruption AGAIN
First off, let me say I have never had this problem prior to PS8. This is now the 4th file i have lost to problems in PS8. All files are .PSB format... -
FH10/MX file corruption
I've been experiencing some problems with opening files created in FH9. If I open them in 10 the text fields become corrupt. The font, layout, and... -
Repairing PSD file corruption
I recently had a harddrive fail. I was able to recover most of the data, but when psd files are opened, PhotoShop displays an error. It says the... -
how to upload an image selected from html file to flash file?
Hello, I have one html file and a flash file. In html file, it is functioning like choosing a Tshirt to design, then how to load that Tshirt picture...



Reply With Quote

