As the title says, after this problem occurs, I naturally go to the source code, cut off the output a little bit, and finally summarize the problem to "temporary files can be found, I didn't respond when I operated on the temporary files. "I didn't realize that this was a problem with the server access permission. I went online and found it. Later, I thought the apache environment configuration was different from the local environment, and I uninstalled it again.
As the title says, after this problem occurs, I naturally go to the source code, cut off the output a little bit, and finally summarize the problem to "temporary files can be found, I didn't respond when I operated on the temporary files. "I didn't realize that this was a problem with the server access permission. I went online and found it. Later, I thought the apache environment configuration was different from the local environment, and I uninstalled it again.
As the title says, after this problem occurs, I naturally go to the source code, cut off the output a little bit, and finally summarize the problem to "temporary files can be found, I didn't respond when I operated on the temporary files. "I didn't realize that this was a problem with the server access permission. I went online and found it. Later, I thought that the apache environment configuration was different from the local environment, and I uninstalled and reinstalled it. I compared it with a line of local configuration files, and it was still the same.
Then I found a breakthrough in a CSDN blog ThinkPhp upload Server Module loading failure summary, which contains the following sentence :.. \ Runtime \ Logs \ log file ", I read the log file on the server and found the following code:
: Open_basedir restriction in effect. File (/tmp) is not within the allowed path (s ):
I realized that the problem lies in the access permission of the tmp Temporary Folder. Then, I moved the tmp temporary file directory uploaded by the file to another disk and set the entire disk to be readable to everyone, the result still does not work. And Google search for the above Code, to get the correct results, the problem is in the configuration of virtual domain name http-vhosts.conf, If you search "php_admin_value open_basedir" will get a lot of answers, copy and add
Solution:
Add the temporary directory of the uploaded file to the end of php_admin_value open_basedir and it looks like this:
Linux
Php_admin_value open_basedir "usr/local/apache/htdocs/www:/tmp"
Windows
Php_admin_value open_basedir "d: \ wampserver \ tmp; e: \ tmp"
Limiting PHP script operations to web directories can prevent programmers from using the copy function to copy system files to web directories. Move_uploaded_file is not restricted by open_basedir, so you do not need to modify the upload_tmp_dir value in php. ini.