php.net |  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
 [2002-06-05 07:09 UTC] luimarma at iti dot upv dot es
Upload fails regardless the value of memory_limit  
value.  
	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. 
	 

Patches

Pull Requests

History

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] sander@php.net
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 Dreoth@houston.rr.com, 
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

http://forums.devshed.com/t51395/s.html

Apache setting a limit on the size of files I upload

/etc/httpd/conf.d/php.conf 

LimitRequestBody
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 28 17:01:27 2024 UTC