[Zt] for php + nginx configuration large file Upload php ftp upload, you need to first upload the file to the PHP server for a temporary file, and then upload it to the FTP server? Turn: http://blog.csdn.net/yangshiqi1089/archive/2011/0 [zt] php + nginx configuration large file Upload
For FTP uploads in PHP, you need to first upload the file to the PHP server for a temporary file, and then upload it to the FTP server.
?
Turn: http://blog.csdn.net/yangshiqi1089/archive/2011/01/19/6152061.aspx
?
For nginx Upload parameters, pay special attention to the client_max_body_size parameter. Otherwise, the request will be interrupted and cannot be accessed by log in php.
The modified php. ini file is as follows:
| Parameters |
Set |
Description |
| File_uploads |
On |
Whether to allow file upload over HTTP. ON is enabled by default. |
| Upload_tmp_dir |
- |
The file is uploaded to the place where the temporary file is stored on the server. if it is not specified, the default temporary folder will be used. |
| Upload_max_filesize |
8 m |
Wangwen business, that is, the maximum file size allowed to be uploaded. The default value is 2 MB. |
| Post_max_size |
8 m |
The maximum value that can be received by posting a form to PHP, including all values in the form. The default value is 8 MB. |
| Description |
| Generally, after the preceding four parameters are set, uploading a file <= 8 m is not a problem under normal network conditions. |
| However, if you want to upload a large file larger than 8 MB, you can only set the above four items. Unless your network has a high upload speed of 100 MB/s, you must set the following parameters. |
| Max_execution_time |
600 |
Maximum time (in seconds) for running each PHP page. the default value is 30 seconds. |
| Max_input_time |
600 |
Maximum time required for receiving data on each PHP page. the default value is 60 seconds. |
| Memory_limit |
8 m |
Maximum memory consumed by each PHP page. the default value is 8 MB. |
No effect, because the webserver uses nginx google, and then adds a parameter to nginx conf:
The default value is 1 MB.
Add a sentence in nginx. conf.
Client_max_body_size 30 m;
Restart
30 M indicates the maximum upload size of 30 M.
?