Asked 7 years ago
2 May 2017
Views 1270
jessica

jessica posted

Error in PHP File Upload ?

uploading big image to server by PHP .
after long process it says max upload size exceeded.

so how to resolve PHP file upload Error ?
Rasi

Rasi
answered Nov 30 '-1 00:00



upload_max_filesize = -1


upload_max_filesize have -1 means unlimited file size upload untill memory limit reach

put the minus -1 for memory_limit for unlimited temporary memory limit

memory_limit = -1


hope it help
Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00

you need change setting of php.ini , you can put max upload size , suppose for default


upload_max_filesize = 200000M

here value is 200000M bytes
you can change it to desirable size .

or you can do

ini_set('upload_max_filesize', 30000M); 



it will change upload_max_filesize dynamically by script .

you need to change post_max_size also for safe side ,

post_max_size = 30000M


memory_limit setting need to change also
Post Answer