Introduction
On supported operating systems, EasyApache 4 uses the PrivateTmp
option with PHP-FPM. EasyApache 4 does this to increase security for temporary files that the running processes in PHP-FPM access. The PrivateTmp
option creates special directories in the /tmp
directory for each Apache PHP-FPM version your system uses. It’s possible that each time you or the system restarts the PHP-FPM service, the PrivateTmp
option will create a new directory.
These files will use the following naming convention:
/tmp/systemd-private-*-ea-phpXX-php-fpm.service-*/tmp/
Procedure
Please note that removing the PrivateTmp
-created directories, either manually or automatically, will cause errors in applications or websites that use PHP-FPM. We strongly encourage that you do not remove these directories. If you need to remove any of these directories, we recommend that you restart the Apache PHP-FPM service. This ensures that Apache PHP-FPM will work correctly.
To restart Apache PHP-FPM, use the following command:
/usr/local/cpanel/scripts/restartsrv_apache_php_fpm --hard
Alternatively, set the session.save_path
directive in the local php.ini
file to the default value to prevent systemd from creating the private tmp directories.
The following article covers how you can make changes to your php.ini
file:
How to set or increase PHP INI memory_limit or other values?
Comments
1 comment
Update: We would like to thank you for your interest in this article/case and encourage your submissions as they are valuable to the ever-expanding development of cPanel & WHM. At this time, this particular issue has not been selected for action from our Development Team, as it may require more development resources than we can allot, or alters the direction cPanel envisions for the product. Submissions persist in our Issue Tracking System in the event the impact of the related issue grows or product direction changes. If you feel that this defect requires direct action, we strongly encourage you to submit a Feature Request to allow the cPanel Community to vote and support your cause.
Thank you again for helping us make cPanel & WHM the hosting platform of choice.
Article is closed for comments.