Colleagues need to call me to develop a picture upload interface, I put the interface document and call example all gave him, the result he did not succeed, ask me.
Step-by-step debugging, the final result of the location of his picture uploaded to the local failure. Print out the $_files array, the error hint is 7
Read the manual that was written to disk failed. The first idea is to upload a temporary folder to fail.
Go to php.ini to view the temporary folder, found no settings, in fact, the default is/tmp directory, modify the temporary folder, set to/tmp, restart PHP-FPM, open phpinfo, see Temp folder for/tmp
Upload again, or report the same error. Why did the write fail? Is it full?
Sure enough, DF command a look,/tmp 100% occupied.
Then go to the php.ini configuration upload temporary folder, change to/temp, restart PHP-FPM, upload success.
Upload error occurs, the first output upload information, check the error code, refer to the manual to see what the reason. As above, a 7 error occurred, the disk could not be written, the Temp folder was found, and the permissions were full.
Solve the problem, and then look at the server's/tmp directory, why full. The results found that the/tmp directory is full of naming rules of the junk files, very much, do not know who did. Now that you have put it in/tmp, delete it.
An issue with picture uploading at work