ID:               17958
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Critical
 Bug Type:         Apache2 related
 Operating System: Linux 2.4.18
 PHP Version:      4.2.3
 New Comment:

I am using PHP 4.2.3 with Apache/1.3.20, RedHat 7.2.

When uploading files with enctype="multipart/form-data" I experienced
the next problem: all files of types other then text/plain or text/html
had been corrupted, e.g., the first 4 lines of a gif picture were:

GIF89a% wered.gif"
Content-Type: image/gif

GIF89a%
, that is, the file name was "ra-powered.gif", a part of this,
content-type and an empty line from the posted data had been added to
the beginning of the file. The following image data remained intact.
The preceding post variable (as phpinfo() listed:

_POST["submit-type"] updat  - must be "update"
_FILES["picture"]    Array
(
    [name] => ra-powered.gif
    [type] => image/gif
    [tmp_name] => /tmp/phpjsjZRj
    [error] => 0
    [size] => 3810
)
_SERVER["CONTENT_TYPE"] multipart/form-data;
boundary=---------------------------7d213414b022e  

) had been corrupt (1-4 last characters cut off, depends on the
content-type). All other variables were ok.
The problem is only with IE 6.0, Opera, Netscape6 and Konqueror are ok.
Tests with PHP 4.2.0 and 4.2.2 show the same results.


Previous Comments:
------------------------------------------------------------------------

[2002-09-17 09:41:13] [EMAIL PROTECTED]

Hi,

I have tested using the following platforms:

Platform 1:
OS: Windows XP Professional
Webserver: Apache/2.0.40
PHP: 4.2.3 

Platform 2:
OS: Windows 2000 Professional
Webserver: Apache 2.0.40
PHP: 4.2.3 

Platform 3:
OS: Windows 2000 Professional
Webserver: Apache 1.3.26
PHP: 4.2.3

I use a custom http client to connect to the http server.
The http requests are multipart/form-data.

A sample request:
POST /cgi-bin/XXXXXXX HTTP/1.1
Authorization: Basic XXXXXXXX
Content-Type: multipart/form-data;
boundary=XXXssxvnjhpdqdxvcrastvybcwvmgnykrXXX
User-Agent: Java1.4.0
Host: XXX.XXX.XXX.X:XXX
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-length: 142

XXXssxvnjhpdqdxvcrastvybcwvmgnykrXXX
Content-Disposition: form-data; name="fieldName"

fieldValue
XXXssxvnjhpdqdxvcrastvybcwvmgnykrXXX-- 

The $_POST array is empty.
I have tested against IBM HTTP Server/V5R2M0 and have not had a probelm
retrieving multipart/form-data POST variables using IBM REXX CGI
Parse.

I am pretty sure my header is valid.

Thanks,
Jeff

------------------------------------------------------------------------

[2002-09-16 09:19:23] [EMAIL PROTECTED]

I currently have got the problem of lost _POST-Vars even without the
enctype=... stuff.

All post vars are lost.

Browsers: Mozilla/1.0, lynx
OS: Debian Linux/PPC
Server: Apache 2.0.40
PHP: 4.2.3/4.3.0(cvs)

Is there any "workaround"? (e.g. downgrading Apache or PHP)

------------------------------------------------------------------------

[2002-09-12 07:24:01] [EMAIL PROTECTED]

updating version

------------------------------------------------------------------------

[2002-09-12 05:42:28] [EMAIL PROTECTED]

The Bug still appears in PHP 4.2.3

------------------------------------------------------------------------

[2002-08-26 10:12:39] [EMAIL PROTECTED]

I have a similar problem using PHP 4.2.2 and Apache 1.3.23. But only
the first value of the $_POST-vars gets lost.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/17958

-- 
Edit this bug report at http://bugs.php.net/?id=17958&edit=1

Reply via email to