A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearPHP - Maximum Total Upload Size? - page 1
User InfoPosts
PHP - Maximum Total Upload Size?#1
I have a php web page with 15 fields. The user will use it to upload images. I tested this by uploading 15 jpg images, each about 2 M, without any problems. On the day I launch, I will be moving this web page to another Linux shared hosting environment (still not sure which). Are there some web hosting environments that limit the size of total uploads in one http request?

posted date: 2009-04-07 13:51:00

Re: PHP - Maximum Total Upload Size?#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-07 13:51:01

Re: PHP - Maximum Total Upload Size?#3
This would be unusual, but of course, check with whatever hosting company you choose. If there were a limit, it certainly would be higher than 30 MB.

posted date: 2009-04-07 13:54:00

Re: PHP - Maximum Total Upload Size?#4
the php.ini directive "post_max_size" should limit how much data you can send in a single POST. if you post 15 images in one post I(m pretty sure that is still considered one POST. So it might be good to check this value before going live.

posted date: 2009-04-07 13:57:00

Re: PHP - Maximum Total Upload Size?#5
The upload limits are set through php ini. You can try get them like so:$post_max_size = ini_get((post_max_size();$upload_max_filesize = ini_get((upload_max_filesize();

posted date: 2009-04-07 14:00:00

Re: PHP - Maximum Total Upload Size?#6
file_uploads, memory_limit and max_execution_time do not limit the maximum total upload size.

posted date: 2009-04-07 14:03:00

Re: PHP - Maximum Total Upload Size?#7
Well yeah, but when you purchase hosting they're going to increase that, and if they don't you can ask them to.

posted date: 2009-04-07 15:03:00

Re: PHP - Maximum Total Upload Size?#8
An Apache restart helps after you've made all these changes but nothing happens

posted date: 2010-02-09 07:52:00

Re: PHP - Maximum Total Upload Size?#9
I(ve seen the best solution here so far, and this is the code:/** * Returns the maximally uploadable file size in megabytes * * @return string */function getMaxUploadSize(){ $max_upload = (int)(ini_get((upload_max_filesize()); $max_post = (int)(ini_get((post_max_size()); $memory_limit = (int)(ini_get((memory_limit()); return min($max_upload, $max_post, $memory_limit); }

posted date: 2013-04-25 09:10:00

Re: PHP - Maximum Total Upload Size?#10
Crappy hosters don't.

posted date: 2013-10-11 13:41:00

Re: PHP - Maximum Total Upload Size?#11
If you are using nginx then make sure that you have the following:server {... client_max_body_size 100M;....}

posted date: 2014-05-03 21:48:00

select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.