#23765 [Asn]: No raw post data from multipart forms

From: Date: Fri, 23 May 2003 18:25:15 +0000
Subject: #23765 [Asn]: No raw post data from multipart forms
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40310@lists.php.net to get a copy of this message
 ID:               23765
 User updated by:  bugs dot php dot com at brome dot com
 Reported By:      bugs dot php dot com at brome dot com
 Status:           Assigned
 Bug Type:         *General Issues
 Operating System: Slackware Linux
 PHP Version:      4.3.1
 Assigned To:      sniper
 New Comment:

Unfortunately, I only have access to one server, and it hosts a busy
public site (over 4,000 pages per hour) - I can't afford downtime.

I could send you some small PHP files to test with (it requires a
4-step process - the upload is step 4) and send a request from my Nokia
3650 to your test server. Would that work?


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

[2003-05-23 13:07:23] bugs dot php dot com at brome dot com

Here is a link to the Nokia API document:

http://www.forum.nokia.com/main/1,6566,21,00.html

Please let me know if I can help or provide any other info. Thanks!

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

[2003-05-23 13:06:09] pollita@php.net

I'd like you to try recompiling PHP with upload support completely
disabled.

Look for the following line in main/php_content_types.c (it'll be near
the top) and simply comment it out or delete it entirely.

{ MULTIPART_CONTENT_TYPE, sizeof(MULTIPART_CONTENT_TYPE)-1, NULL,
rfc1867_post_handler },

Recompile like that and rerun a test using:
<?php
$fp = fopen('serverdata.txt', 'w');
fwrite($fp, serialize($_SERVER));
fclose($fp);

copy('php://input', 'logfile.txt');
?>

And show us what you get. (Though since you're uploading a picture feel
free to snip the binary data in logfile.txt down to a representative
sample)

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

[2003-05-23 12:48:21] sniper@php.net

Assigning to myself, hopefully I can loan one of those phones from a
friend.


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

[2003-05-23 12:47:27] sniper@php.net

Do you have any URLs to that document?


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

[2003-05-23 11:31:34] bugs dot php dot com at brome dot com

Well, I need to support file uploads from this device - bug or no...
This is the Nokia 3650 smartphone with camera - the one they're selling
and advertising on TV worldwide. It would be great if PHP supported the
feature that lets you upload photos directly to web albums (that's what
I'm trying to create). So far, you're saying this is impossible.

Any help would be greatly appreciated!

Below is an example from Nokia's API document that shows what the HTTP
POST coming form the phone is supposed to look like. Can you or someone
tell me if PHP should or should not be able to recognize and handle
this as an HTTP POST file upload?


POST http://www.club.nokia.com/login/uploadImage?ekey=12345
HTTP/1.1 
User-Agent: Photo Uploader (7650/1.0.0) 
Content-Type: multipart/form-data; boundary=AaB03x 
Content-Length: xxxx 

--AaB03x 
Content-Disposition: form-data; name="DirId" 
Content-Type: text/plain; charset=utf-8 

12345 
--AaB03x 
Content-Disposition: form-data; name="Filename" 
Content-Type: text/plain; charset=utf-8 

cap10001.jpg 
--AaB03x 
Content-Disposition: form-data; name="MimeType" 
Content-Type: text/plain; charset=utf-8 

image/jpeg 
--AaB03x 
Content-Disposition: form-data; name="ImageData";
filename="cap10001.jpg" 
Content-Type: image/jpeg 
Content-Transfer-Encoding: binary 

<contents of file> 
--AaB03x--

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

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/23765

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



Thread (9 messages)

« previous php.bugs (#40310) next »