Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the MAXIMUM file upload size in PHP ini file

Tags:

php

localhost

I have changed the upload_max_filesize to 150MB in the php.ini file.

but http://localhost/info.php shows the upload_max_filesize is still showing 16MB .

I have also restarted the server.

what is the the problem?

I am unable to find the solution.

like image 480
SureshKumar Vegesna Avatar asked Nov 28 '11 13:11

SureshKumar Vegesna


People also ask

How can I upload large files over 500mb in PHP?

By changing the upload_max_filesize limit in the php. ini file. By implementing file chunk upload, that splits the upload into smaller pieces an assembling these pieces when the upload is completed.

Can we upload file of any size to a PHP application?

By default, PHP file upload size is set to maximum 2MB file on the server, but you can increase or decrease the maximum size of file upload using the PHP configuration file ( php. ini ), this file can be found in different locations on different Linux distributions.


2 Answers

Make sure that post_max_size is larger than your upload_max_filesize value.

This limits the overall size of the POST body, which also has a bearing on the max upload size.

You will also need to ensure that memory_limit is larger than post_max_size.

like image 125
DaveRandom Avatar answered Sep 23 '22 19:09

DaveRandom


Also upload_max_filesize should be changed in both php.ini files.. In the Apache folder, and the PHP folder..

like image 39
Zencode.dk Avatar answered Sep 20 '22 19:09

Zencode.dk