Things to note when uploading large files in the PHP environment
Public Environment Pre-section
Nginx+linux Environmental considerations
PHP environment upload Large files need to note:
/usr/local/php/etc/php-fpm.conf.default
Request_terminate_timeout = 0//This is the execution time of the fastcgi, which is not limited by default
Client_max_body_size 256m;
Fastcgi_buffer_size 256k;
Fastcgi_buffers 256k;
Fastcgi_busy_buffers_size 256k;
Fastcgi_temp_file_write_size 256k;
Fastcgi_connect_timeout 3000;
Fastcgi_send_timeout 3000;
Fastcgi_read_timeout 3000;
In addition, PHP also needs to be configured:
Memory_limit 512M
Max_execution_time 0
Post_max_size 256M
Upload_max_filesize 256M
Precautions in the Apache+windows environment
Configure the php.ini file (for example, 500M files of the following size)
Look for the following options and modify
File_uploads = on; open File upload option
upload_max_filesize = 500M; upload file limit
If you want to upload larger files, only the above two are not enough, you must increase the server cache limit, the maximum execution time of the script is longer
Post_max_size = 500M;p ost Upper
max_execution_time = 1800; Maximum execution time of each script, in seconds script maximum execution times
max_input_time = 1800; Maximum amount of time each script may spend parsing request data
Memory_limit = 128M; Maximum amount of memories a script may consume (128MB) memory limit
http://www.bkjia.com/PHPjc/1004540.html www.bkjia.com true http://www.bkjia.com/PHPjc/1004540.html techarticle PHP Environment upload large files to note the public environment of the pre-paragraph form enctype=multipart/form-data action=upload.php Method=post!--max_file_size must Precede the file input fie ...