php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #12316 Have to increase memory_limit to be able to upload big files
Submitted: 2001-07-23 09:01 UTC Modified: 2001-10-28 17:35 UTC
From: jack at mobil dot cz Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.5 OS: Linux
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: jack at mobil dot cz
New email:
PHP Version: OS:

 

 [2001-07-23 09:01 UTC] jack at mobil dot cz
If you want to use file upload, you have to correctly set upload_max_size and post_max_size. That's o.k. But you also have to set memory_limit and max_execution_time to values high enough.

The former seems to be result of very poor design (I admit I haven't checked the source code closely but as far as I can tell from a quick look at main/rfc1867.c, the whole form is first read and stored in memory and only then parsed and divided into files instead of being parsed on the run).

I am not sure about the second issue since I don't know how exactly max_exec*_time works. Is it counted from the very start of request or from the moment script starts being executed? (that is -- if I set max_execution_time to 30 secs and the upload takes 55 secs, will PHP die? or will the upload finish and script will get 30secs to run?). I know I can get around this limit -- I just wonder.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-28 17:35 UTC] sniper@php.net
This should be fixed in CVS now. You can try the latest 
snapshot from http://snaps.php.net/

Also, there are some minor leaks still in the new code.
If you encounter such leaks, please send the shortest
possible code + html with which you can reproduce the leak
to php-dev@lists.php.net (or me) so we can get rid of these leaks. 

This fix will be in PHP 4.2.0.

--Jani

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 16:01:28 2025 UTC