mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Use PHP sys_temp_dir by default (#10428)
* Fix installer not generating tmp directory directive This fixes a usecase when open_basedir is set, not allowing php to write to default temp directory /tmp. In that case, temp directory is set by `php_admin_value[sys_temp_dir] = /var/www/site/tmp` Without setting config['temp_dir'] in generated config.php, LibreNMS will use /tmp regardless of what is set in fpm configuration. * is_writeable and is_writable are both valid, but let's stay consistent * Make $config['temp_dir'] non static * Remove $config['temp_dir'] from standard config.php * Make sys_get_temp_dir() fallback to '/tmp' * Update defaults.inc.php * Update install.php * Update Config.php * Update defaults.inc.php * Update defaults.inc.php
This commit is contained in:
committed by
Neil Lathwood
parent
f16805b71d
commit
ccf2d9a5c5
@@ -461,6 +461,7 @@ class Config
|
||||
self::setDefault('log_dir', '%s/logs', ['install_dir']);
|
||||
self::setDefault('log_file', '%s/%s.log', ['log_dir', 'project_id']);
|
||||
self::setDefault('plugin_dir', '%s/plugins', ['html_dir']);
|
||||
self::setDefault('temp_dir', sys_get_temp_dir() ?: '/tmp');
|
||||
// self::setDefault('email_from', '"%s" <%s@' . php_uname('n') . '>', ['project_name', 'email_user']); // FIXME email_from set because alerting config
|
||||
|
||||
// deprecated variables
|
||||
|
Reference in New Issue
Block a user