An issue with picture uploading at work

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.