1. The problem was recently found during the development of the online storage system. When uploading large files, an IOError #2038 error is prompted. The system uses PHP and Flash controls to upload files. The information on the Internet shows that the possible causes of this error include: invalid URL Upload File size exceeds the maximum upload limit on the server or the maximum POST limit is connected to the server and the upload is interrupted due to an exception.
1. I recently found that I/O Error #2038 is prompted when uploading large files when developing the online storage system. The system uses PHP and Flash controls to upload files. The information on the Internet shows that the possible causes of this error include: invalid URL Upload File size exceeds the maximum upload limit on the server or the maximum POST limit is connected to the server and the upload is interrupted due to an exception.
1. Problems
Recently, when developing the online storage system, I/O Error #2038 is prompted when uploading large files. The system uses PHP and Flash controls to upload files. The information on the Internet shows that the possible causes of this error include:
-
Invalid URL
-
The size of the uploaded file exceeds the maximum upload limit or the maximum POST limit of the server.
-
Abnormal disconnection from the server
-
The uploaded file is empty.
-
File (folder) Permission
2. Solution
First, the reasons 3, 4, and 5 are excluded. while uploading small files is normal, the reason 1 can also be ruled out. Therefore, the solution is concentrated on 2nd items. Possible reasons include:
-
The Upload file type is limited.
-
Max_input_time timeout
-
Upload_max_filesize File Upload restrictions
Inphp.iniRespectivelymax_execution_time,max_input_time,memory_limit,post_max_size,upload_max_filesizeAnd other five parameters (see php. ini modifies the php file size limit) and increases the parameter value. It is found that an error still exists when uploading a file smaller than the configured parameter value.
The Nginx server is used. The description in this article is similar to that in this article.client_max_body_sizeParameter settings:
client_max_body_size 1000m;
Solve the problem after restarting the Nginx server.
3. Summary
When uploading large files in a browser, you must modify the Nginx and PHP parameters at the same time, including:
-
Nginx:client_max_body_size
-
PHP:max_execution_time,max_input_time,memory_limit,post_max_size,upload_max_filesize
Original article address: I/O Error #2038 Error solution for Flash upload. Thank you for sharing it with me.