Raspberry Pi / Computer projects

How to change PHP's upload file-size limit

For this example, we'll configure php.ini to allow uploads under 512M. Find and change the following settings:

file_uploads = On ;enable file uploads
upload_max_filesize = 512M ;upload size limit

To upload larger files, these two changes alone are not enough. You also need to raise the server's buffer limit and give scripts more time to run.

post_max_size = 512M ;POST size limit
max_execution_time = 1800 ; Maximum execution time of each script, in seconds
max_input_time = 1800 ; Maximum amount of time each script may spend parsing request data
memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)

Published 08/17/2015 · Krunk Zhou

Join the conversation