First, open php.ini
1. file_uploads = on ;
Switch whether to allow HTTP file upload is ON by default that is open;
2. upload_tmp_dir;
Files uploaded to the local store temporary files on the server, if not specified will use the system default temporary folder;
3.upload_max_filesize = 8m ;
Wang Wen business, which allows a maximum upload file size, the default is 2M;
4.post_max_size = 8m ;
Refers to the maximum value of the PHP form POST can receive, in a form including all values and defaults to 8M;
Generally, the above-described four parameters set, upload <= 8M file is not a problem in the network under normal circumstances.
But if you want to upload> 8M bulky files, settings, only these four also will be able to do the same.
Second, to further configure the following parameters
1.max_execution_time = 600 ;
The maximum time for each page to run PHP value (in seconds), default 30 seconds;
2.max_input_time = 600 ;
PHP the maximum time required for each page of the received data, default 60 seconds;
3.memory_limit = 8m ;
Each PHP pages eaten maximum memory, the default 8M;
After the above parameter modification, normally allowed for the network, a large volume can upload files
max_execution_time = 600
max_input_time = 600
memory_limit = 32m
file_uploads = on
upload_tmp_dir = /tmp
upload_max_filesize = 32m
post_max_size = 32m
Third, restart php service, validate the configuration
service php-fpm restart
systemctl restart php-fpm
Reference: https: //blog.csdn.net/u013239233/article/details/78040794