php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #567 File upload failes when boundary in MAX_FILE_SIZE
Submitted: 1998-07-22 06:14 UTC Modified: 1999-10-17 10:09 UTC
From: soren dot roug at eea dot eu dot int Assigned:
Status: Closed Package: Other
PHP Version: 3.0.2a OS: Solaris 2.6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: soren dot roug at eea dot eu dot int
New email:
PHP Version: OS:

 

 [1998-07-22 06:14 UTC] soren dot roug at eea dot eu dot int
I use the libwww Perl package to upload a file. It uses the simple boundary of --000. If I set the MAX_FILE_SIZE to 1000000 PHP reports uploading nothing. But if I change the MAX_FILE_SIZE to 1010101 it works!.

This is what I send to PHP:

--000
Content-Disposition: form-data; name="MAX_FILE_SIZE"

1000000
--000
Content-Disposition: form-data; name="hostname"

myhostname
--000
Content-Disposition: form-data; name="userfile"; filename="motd"
Content-Type: text/plain

Sun Microsystems Inc.   SunOS 5.5       Generic November 1995

--000--

This is what PHP 3.02 returns:
HTTP/1.1 200 OK
Date: Wed, 22 Jul 1998 10:08:16 GMT
Server: Netscape-Enterprise/3.0
Content-Type: text/html
Content-Type: text/html; charset=iso-8859-1
Client-Date: Wed, 22 Jul 1998 10:10:11 GMT
Client-Peer: 194.182.237.134:80
Title: Upload Directory Server

<html>
<head>
<title>Upload Directory Server</title>
</head>

<body BACKGROUND="http://eea.eionet.eu.int:8001/eionet-irc/graphics/bg.gif">
<IMG SRC="EEA_logo.gif">
<H1>Upload result</H1>
You sent this file: .<BR>
It ended here as: .<BR>
It has been removed from the server again.
<HR>


This is the PHP script:
<html>
<head>
<title>Upload Directory Server</title>
</head>

<body BACKGROUND="http://eea.eionet.eu.int:8001/eionet-irc/graphics/bg.gif">
<IMG SRC="EEA_logo.gif">
<H1>Upload result</H1>
You sent this file: <?php echo $userfile_name ?>.<BR>
It ended here as: <?php echo $userfile ?>.<BR>
It has been removed from the server again.
<?php
if($userfile != "none" && $userfile != "")
        unlink($userfile);
?>
<HR>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-17 10:09 UTC] sas at cvs dot php dot net
Please try again with a recent release, and if it fails, resubmit a bug report.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 11:01:37 2025 UTC