allow defining php_value/php_admin_value for session.save_path when using php-fpm; fixes #954
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -218,7 +218,7 @@ class Fpm
|
|||||||
$openbasedir .= $_phpappendopenbasedir;
|
$openbasedir .= $_phpappendopenbasedir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$fpm_config .= 'php_admin_value[session.save_path] = ' . \Froxlor\FileDir::makeCorrectDir(Settings::Get('phpfpm.tmpdir') . '/' . $this->domain['loginname'] . '/') . "\n";
|
|
||||||
$fpm_config .= 'php_admin_value[upload_tmp_dir] = ' . \Froxlor\FileDir::makeCorrectDir(Settings::Get('phpfpm.tmpdir') . '/' . $this->domain['loginname'] . '/') . "\n";
|
$fpm_config .= 'php_admin_value[upload_tmp_dir] = ' . \Froxlor\FileDir::makeCorrectDir(Settings::Get('phpfpm.tmpdir') . '/' . $this->domain['loginname'] . '/') . "\n";
|
||||||
|
|
||||||
$admin = $this->getAdminData($this->domain['adminid']);
|
$admin = $this->getAdminData($this->domain['adminid']);
|
||||||
@@ -261,6 +261,11 @@ class Fpm
|
|||||||
$fpm_config .= 'php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f ' . $this->domain['email'] . "\n";
|
$fpm_config .= 'php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f ' . $this->domain['email'] . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check for session.save_path, whether it has been specified by the user, if not, set a default
|
||||||
|
if (strpos($fpm_config, 'php_value[session.save_path]') === false && strpos($fpm_config, 'php_admin_value[session.save_path]') === false) {
|
||||||
|
$fpm_config .= 'php_admin_value[session.save_path] = ' . $this->getTempDir() . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
// append custom phpfpm configuration
|
// append custom phpfpm configuration
|
||||||
if (! empty($fpm_custom_config)) {
|
if (! empty($fpm_custom_config)) {
|
||||||
$fpm_config .= "\n; Custom Configuration\n";
|
$fpm_config .= "\n; Custom Configuration\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user