PHP Warning:file upload error-unable to create a temporary File in Unknown on line 0

Source: Internet
Author: User
Tags configuration php

Code in the local run everything OK, put on the server, the site access is normal, upload the error occurred.

Tip: PHP warning:file upload error-unable to create a temporary File in Unknown on line 0

Servers that are having problems: Windows server

Iis8 php5.5.37 FastCGI

Reason: Originally in the Configuration PHP environment, PHP.ini did not set the Upload_tmp_dir.

If PHP.ini is not set Upload_tmp_dir, the default PHP process reads and writes to the system's temporary directory (Windows defaults to/tmp for c:/windows/temp,linux), so it is safe to set this value.

WORKAROUND: Set the path of the Upload_tmp_dir to the folder in the project where the uploaded files are stored.

PHP Warning:file upload error-unable to create a temporary File in Unknown on line 0

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.