|
|||||||||||
|
DO NOT REPLY [Bug 14031] New: - POST handling for multi part forms incorrect
From: <bugzilla(at)apache.org>
Date: Mon Oct 28 2002 - 21:48:23 EST
POST handling for multi part forms incorrect
Summary: POST handling for multi part forms incorrect
Product: Apache httpd-1.3
Version: 1.3.27
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Other
AssignedTo: bugs@httpd.apache.org
ReportedBy: luke@cramvision.com
I recently upgraded one of my RedHat7.1 servers running apache 1.3.20 to Redhat8.0 running Apache 1.3.26 and then 1.3.27 and I discovered that previously good PHP code no longer worked. The code was simple file upload code for a multi part form with a form element input="file". The POST data just didn't seem to come through to the PHP code. I tried the same thing on a Redhat7.3 box running apache 1.3.26 and then 1.3.27 and I got the same problem. As soon as I put the same code back on version 1.3.20 on another server it worked first time. the following is the code which I used to discover the problem. <HTML>
<?php
if ($upload) {
// connect to the database
$db = mysql_connect("192.168.x.x","foo","bar"); mysql_select_db("graphic",$db); @copy("$formdata","./tempfile.jpg"); $size = GetImageSize("./tempfile.jpg");
if ($size[0] < $size[1]){
$data = addslashes(fread(fopen($formdata, "r"), filesize($formdata))); $result=MYSQL_QUERY("INSERT INTO binary_data (bin_data,file_name,file_size,file_type,dataupright) ". "VALUES
$id= mysql_insert_id();
MYSQL_CLOSE();
<?php } ?> </BODY> </HTML> To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org For additional commands, e-mail: bugs-help@httpd.apache.org Received on Tue Oct 29 02:47:30 2002 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 16:44:01 EDT |
||||||||||
|
|||||||||||