Applicable to:
- Plesk for Linux
Symptoms
-
Unable to upload a file in Wordpress > example.com > Log in > Media > Add New with the following error
CONFIG_TEXT: Missing temporary directory
OR
CONFIG_TEXT: Missing a temporary folder
-
There are the following records in
/var/www/vhosts/system/example.com/logs/error_log
file:CONFIG_TEXT: AH01071: Got error 'PHP message: PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0\n', referer: https://example.com/wp-admin/upload.php
-
/tmp
folder has been cleaned up recently withrm -rf /tmp/*
.
-
By default PHP-FPM service has PrivateTmp enabled:
# systemctl cat plesk-php72-fpm.service | grep PrivateTmp
PrivateTmp=trueNote: the PHP version can be identified in Domains > example.com > PHP Settings.
-
PrivateTmp=true
means that uploaded files uses the following folder:
/tmp/systemd-private-a843c1c414a649b6a153d621c2607c9e-plesk-php72-fpm.service-UuymOU/tmp/
Cause
Cleaning up /tmp
folder resulted in the fact that /tmp
for the PHP-FPM does not exist.
Resolution
-
Connect to the server via SSH
-
Restart the PHP service used by the domain which can be identified in Domains > example.com > PHP Settings. This will recreate the temporary folder:
# service plesk-phpXX-fpm restart
Comments
7 comments
Hi,
I have exactly this problem, that Wordpress complains about an missing temp folder and I have tried to do the workaround as described here
https://www.wpbeginner.com/wp-tutorials/how-to-fix-missing-a-temporary-folder-error-in-wordpress/
but doesn't solve the problem. Since I have this issue on different subdomains, I believe the issue is somewhere on the Plesk/Server side.
I am not an IT-expert and for me the above text is too cryptic. What does it mean to /how do I restart the PHP service? I can log-into Plesk Obsidian and I see the "PHP settings (v7.3.20)" but there is no possibility to restart it.
Can you please provide more information. Thank you.
Hi bjoern.gerlach,
You can restart the PHP service corresponding to that domain in Plesk > Tools & Settings > Services Management > restart the service on the right-hand side of the PHP version
The step described in the article refers to restarting the service via SSH in the Linux console.
Dear Nelson,
thank you so much for your response. I guess I found the "Services Management" page under the heading "Server Management":
Interestingly enough, on this Service page I was not able to find any reference to PHP:
Does this explain my problem? Any thoughts what to do?
I appreciate your support. Thank you,
Björn
Hello bjoern.gerlach
Indeed, this doesn't look right.
Please, make sure, that PHP versions in question are installed, this article should help you.
If installing missing PHP handler won't help, submit a support request, additional investigation will be required.
Hi Ivan,
thanks a lot for your response. I had updated already the PHP version as you described and this indeed solved my problem.
Best,
Björn
Hello bjoern.gerlach
Glad to hear that it's resolved now =)
I have this problem frequently and when the service has been restarted all working well.
But then the problem return, there is any method for fix permanently? :/
Thanks for all
Please sign in to leave a comment.