add new setting to specify values for the PATH env-variable for php-fpm
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -69,6 +69,17 @@ return array(
|
||||
'default' => '/usr/share/php/:/usr/share/php5/',
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_phpfpm_envpath' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['envpath'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'envpath',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'string_delimiter' => ':',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '/usr/local/bin:/usr/bin:/bin',
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_phpfpm_fastcgi_ipcdir' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['ipcdir'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
|
||||
@@ -414,6 +414,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('phpfpm', 'max_requests', '0'),
|
||||
('phpfpm', 'tmpdir', '/var/customers/tmp/'),
|
||||
('phpfpm', 'peardir', '/usr/share/php/:/usr/share/php5/'),
|
||||
('phpfpm', 'envpath', '/usr/local/bin:/usr/bin:/bin'),
|
||||
('phpfpm', 'enabled_ownvhost', '0'),
|
||||
('phpfpm', 'vhost_httpuser', 'froxlorlocal'),
|
||||
('phpfpm', 'vhost_httpgroup', 'froxlorlocal'),
|
||||
@@ -686,7 +687,7 @@ opcache.interned_strings_buffer'),
|
||||
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
||||
('panel', 'customer_hide_options', ''),
|
||||
('panel', 'version', '0.9.38.8'),
|
||||
('panel', 'db_version', '201801110');
|
||||
('panel', 'db_version', '201801260');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `panel_tasks`;
|
||||
|
||||
@@ -3865,3 +3865,12 @@ opcache.interned_strings_buffer');
|
||||
|
||||
updateToDbVersion('201801110');
|
||||
}
|
||||
|
||||
if (isDatabaseVersion('201801110')) {
|
||||
|
||||
showUpdateStep("Adding php-fpm php PATH setting for envrironment");
|
||||
Settings::AddNew("phpfpm.envpath", '/usr/local/bin:/usr/bin:/bin');
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToDbVersion('201801260');
|
||||
}
|
||||
|
||||
@@ -169,6 +169,10 @@ class phpinterface_fpm
|
||||
$this->getTempDir();
|
||||
}
|
||||
|
||||
$env_path = Settings::Get('phpfpm.envpath');
|
||||
if (!empty($env_path)) {
|
||||
$fpm_config .= 'env[PATH] = ' . $env_path . "\n";
|
||||
}
|
||||
$fpm_config .= 'env[TMP] = ' . $tmpdir . "\n";
|
||||
$fpm_config .= 'env[TMPDIR] = ' . $tmpdir . "\n";
|
||||
$fpm_config .= 'env[TEMP] = ' . $tmpdir . "\n";
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
$version = '0.9.38.8';
|
||||
|
||||
// Database version (YYYYMMDDC where C is a daily counter)
|
||||
$dbversion = '201801110';
|
||||
$dbversion = '201801260';
|
||||
|
||||
// Distribution branding-tag (used for Debian etc.)
|
||||
$branding = '';
|
||||
|
||||
@@ -2100,3 +2100,5 @@ $lng['phpfpm']['ini_flags'] = 'Enter possible <strong>php_flag</strong>s for php
|
||||
$lng['phpfpm']['ini_values'] = 'Enter possible <strong>php_value</strong>s for php.ini. One entry per line';
|
||||
$lng['phpfpm']['ini_admin_flags'] = 'Enter possible <strong>php_admin_flag</strong>s for php.ini. One entry per line';
|
||||
$lng['phpfpm']['ini_admin_values'] = 'Enter possible <strong>php_admin_value</strong>s for php.ini. One entry per line';
|
||||
$lng['serversettings']['phpfpm_settings']['envpath'] = 'Paths to add to the PATH environment. Leave empty for no PATH environment variable';
|
||||
|
||||
|
||||
@@ -1751,3 +1751,4 @@ $lng['phpfpm']['ini_flags'] = 'Mögliche <strong>php_flag</strong>s für die php
|
||||
$lng['phpfpm']['ini_values'] = 'Mögliche <strong>php_value</strong>s für die php.ini. Pro Zeile eine Direktive';
|
||||
$lng['phpfpm']['ini_admin_flags'] = 'Mögliche <strong>php_admin_flag</strong>s für die php.ini. Pro Zeile eine Direktive';
|
||||
$lng['phpfpm']['ini_admin_values'] = 'Mögliche <strong>php_admin_value</strong>s für die php.ini. Pro Zeile eine Direktive';
|
||||
$lng['serversettings']['phpfpm_settings']['envpath'] = 'Pfade für die PATH Umgebungsvariable. Leerlassen, um keine PATH Umgebungsvariable zu setzen.';
|
||||
|
||||
Reference in New Issue
Block a user