Ubuntu 18.04.5 LTS
PHP 7.3.28
Apache/2.4.29
I am occasionally getting this error. It doesnt happen on every request, and when I fix the permissions and restart Apache it goes away for a bit. But, it always comes back after a short amount of time.
Warning: Unknown: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0
It is proving quite difficult to debug the problem, as it is a seemingly random issue and have not been able to find the root cause.
I would like to know if anyone has experienced anything similar, and what was done to resolve it.
I have increased the post_max_size and uncommented the sys_temp_dir values in my php.ini, but they have had no effect.
2
Answers
Check the path of the temporary folder you’re using and make sure the apache user can write into that folder.
You can also try to create a new temporary directory owned by the apache user and configure php to write into it.
Add
to php.ini file and restart Apache.
Reference: https://github.com/guzzle/guzzle/issues/1363#issuecomment-173778434