|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17606 File upload fails on large files
Submitted: 2002-06-05 07:09 UTC Modified: 2003-06-03 02:42 UTC
From: luimarma at iti dot upv dot es Assigned:
Status: Closed Package: HTTP related
PHP Version: 4.2.1 OS: RedHat 7.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: luimarma at iti dot upv dot es
New email:
PHP Version: OS:


 [2002-06-05 07:09 UTC] luimarma at iti dot upv dot es
Upload fails regardless the value of memory_limit  
	I am using the following values for post 
file uploading: 
		memory_limit = 10M 
		post_max_size = 10M 
		file_uploads = On 
		upload_max_filesize = 10M 
		allow_url_fopen = On 
	Uploading anything bigger than a pair of 
megs fails 
	I have also tried with php-4.1.2-7 but then 
I could only upload till memory_limit value, and 
the upload tmp dir is only used when the whole 
file is in memory, so I can only upload files up 
to the amount of memory y have in the system. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-05 07:55 UTC] luimarma at iti dot upv dot es
The first problem was solved (now memory_limit is 
used) as it was a configuration problem. 
 The second problem still stays. The upload eats 
system memory until memory_limit. If I am using a 
tmp dir why does this happen?
 [2002-06-06 04:22 UTC]
Yeah, this is known behaviour. PHP reads the whole uploaded file into memory before writing it to disk. Not a bug.
 [2002-06-10 03:24 UTC] luimarma at iti dot upv dot es
Well, I  have been doing more tests and it seems  
that the system memory that is being used is for  
the catching of the filesystem. I dont know if it  
is a good thing that so many memory is eaten just  
for file catching but this is an operating system  
issue and not php related bug so If everyone  
agrees I close the bug.   
Regarding last message from, 
did you double check the values for the php.ini 
file, related with post and file uploading? 
Remenber that post limit should be at least 
filesize+size of php script. 
		  memory_limit =  ?? 
                post_max_size =  ?? 
                file_uploads = On  
                upload_max_filesize = ??  
                allow_url_fopen = On
 [2003-07-17 06:13 UTC] leon66427 at yahoo dot com dot tw
I just found a thread... and it fix my problem

Apache setting a limit on the size of files I upload


PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Oct 05 16:03:45 2022 UTC