php_home_tmp_session_save_path (TEMPLATE)

Version 1.531

Feature
Finished

For systemd boxes, their php-fpm70.service file (for example) will have: PrivateTmp=true Anytime php-fpm70 is restarted, this virtual tmp directory could be purged (not 100% sure on the conditions for this). Instead of setting PrivateTmp=false, we opted for a more User oriented solution to use: php_admin_value[session.save_path] = /home/username/tmp set in the per-User: /usr/local/directadmin/data/users/USER/php/php-fpm70.conf via the template change in: /usr/local/directadmin/data/templates/php-fpm.conf using: |*if PHP_SESSION_SAVE_PATH!=""| php_admin_value[session.save_path] = |PHP_SESSION_SAVE_PATH| |*endif| The internal default will depend entirely if the box supports systemd by default. For CentOS 7 or newer Debian versions, the default will be: php_home_tmp_session_save_path=1 for older init.d OSs the default will be: php_home_tmp_session_save_path=0 At the moment, this only applies to php-fpm instances, as we've not had other reports of mod_php (for example) losing it's sessions when httpd uses PrivateTmp=true. Not sure of the difference there, but if we encounter any such reports, we can expand the setting to mod_php, etc.. At any time, you can disable the feature by adding: php_home_tmp_session_save_path=0 to the directadmin.conf, restart DA, and also issue a config rewrite: cd /usr/local/directadmin/custombuild ./build rewrite_confs

Interested to try DirectAdmin? Get a 30-day Free Trial!