php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16449 Problem with upload of binary files
Submitted: 2002-04-05 06:48 UTC Modified: 2002-04-05 06:50 UTC
From: mirbuf at tin dot it Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.1.2 OS: Win2K Professional
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mirbuf at tin dot it
New email:
PHP Version: OS:

 

 [2002-04-05 06:48 UTC] mirbuf at tin dot it
Hello,

I'm having a problem with upload of binary files (tipically image/jpeg, image/pjpeg).

The problem seems to happen with files bigger than 20k.  Infact it doesn't happen with tiny files like 5-10-15k.

I've done a class to handle file uploads, and it worked fine with previous version of PHP (4.0.6).  I tested also against Linux version (still 4.0.6) and it works fine.

The class simply handle $HTTP_POST_FILES[$fieldname]['tmp_name'] and does a copy($tempName,$filename).

Using $_FILES either doesn't work.

I tested against PHP 4.1.2, PHP 4.2.0RC1 and RC2 too, but the bug still persists, on Windows 2000 platform.

I cannot verify this, but unless the copy function is broken, the temporary file uploaded to Apache is already corrupt.

Any advice is kindly appreciated.

Thanks

Mirko Buffoni

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-05 06:50 UTC] jan@php.net
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php
 [2002-04-05 07:00 UTC] mirbuf at tin dot it
To help tracing this bug I can give the following additional information:

- Apache version is 1.3.23
- Files are always trunked at offset 0x3E4E (15950), or 0x3E3E (15938).  At this position there is always garbage in the form of 7 numbers bigger than zero, and the rest of bytes always set to zero (example:  08 10 C5 01 80 E0 F3 00 00 00 00 00 ... 00 ... until the end of the file).

Mirko
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 05:01:31 2024 UTC