Bug 25061

Summary: PHP "upload" implementation change
Product: [Retired] Red Hat Linux Reporter: Need Real NameMichael J. Fiorill <mfiorill>
Component: phpAssignee: Phil Copeland <copeland>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: mfiorill
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-12-17 20:43:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Code to receive a file from a form with file upload (and put into MySQL) none

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">