Bug 25061 - PHP "upload" implementation change
Summary: PHP "upload" implementation change
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: php
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phil Copeland
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-26 23:52 UTC by Need Real NameMichael J. Fiorill
Modified: 2007-04-18 16:30 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-12-17 20:43:17 UTC
Embargoed:


Attachments (Terms of Use)
Code to receive a file from a form with file upload (and put into MySQL) (1.13 KB, text/plain)
2001-01-27 00:02 UTC, Need Real NameMichael J. Fiorill
no flags Details

Description Need Real NameMichael J. Fiorill 2001-01-26 23:52:04 UTC
Dear RedHat, as far as I can tell this is where I'm supposed to send 
this information. On the new PHP RPM, php-4.0.4pl1-3.i386.rpm the 
file upload support appears to be broken. However, furthur 
investigation reveals that uploads seem to be processed differently in 
PHP 4.0.4 (at least with this RPM). No longer does the data from the 
uploaded file come in as a string. This breaks the upload support 
that worked with previous RPMs.

The new implementation of PHP puts all data for an uploaded file  in 
as a file only (in RH 7.0 as a file in /tmp), this file is then destroyed 
when the PHP script terminates. While this seems to be a wise 
memory managment decision, it is something that isn't clearly 
documented anywhere, including the PHP site. In fact, the example 
of files uploads on the PHP site does not work with the new RPM.

If you guys would like to see the code I had to write to get file uploads 
to work with your new RPM, please give me an e-mail address to 
send code to, or if it's more convienient I'll post it to our company 
website.

If I sent this information to the wrong place, I apologize. If I, or we 
(Digital Indigo) can assist you anyway, please feel free to contact me.  
RedHat has offered excellent distributions and support to us, and 
we'd be more than glad to help you out if at all possible.

Sincerely,
Mike Fiorill

Comment 1 Need Real NameMichael J. Fiorill 2001-01-27 00:02:56 UTC
Created attachment 8368 [details]
Code to receive a file from a form with file upload (and put into MySQL)

Comment 2 Nalin Dahyabhai 2001-01-29 20:06:32 UTC
We're getting a number of reports about both 3.0.18 and 4.0.4pl1.

Comment 3 Need Real NameMichael J. Fiorill 2001-12-17 20:43:13 UTC
Upon upgrading to RedHat 7.2 it appeared as though posting files to a 

PHP script was broken. This was not the case, however. All scripts which 

appeared to have broken scripts had one thing in common... They did not 

have the following text in the form tag: enctype="multipart/form-data"



To fix any post bugs where files are not acceppted by the PHP script your 

form tag should look something like this: <form 

action=/sys-php/iformmail.php method=post 

enctype="multipart/form-data">


Note You need to log in before you can comment on or make changes to this bug.