enhance php-fpm configuration options to use custom-ini-settings, refs #587

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-07-05 10:54:52 +02:00
parent 69e2c7dee1
commit b7a4b69ee0
10 changed files with 108 additions and 24 deletions

View File

@@ -50,10 +50,49 @@ class phpinterface_fpm
* @var array
*/
private $_ini = array(
'php_value' => array('error_reporting', 'max_execution_time', 'include_path', 'upload_max_filesize', 'log_errors_max_len'),
'php_flag' => array('short_open_tag', 'asp_tags', 'display_errors', 'display_startup_errors', 'log_errors', 'track_errors', 'html_errors', 'magic_quotes_gpc', 'magic_quotes_runtime', 'magic_quotes_sybase'),
'php_admin_value' => array('precision', 'output_buffering', 'disable_functions', 'max_input_time', 'memory_limit', 'post_max_size', 'variables_order', 'gpc_order', 'date.timezone'),
'php_admin_flag' => array('allow_call_time_pass_reference', 'allow_url_fopen', 'expose_php', 'ignore_repeated_errors', 'ignore_repeated_source', 'report_memleaks', 'register_argc_argv', 'file_uploads', 'allow_url_fopen')
'php_value' => array(
'error_reporting',
'max_execution_time',
'include_path',
'upload_max_filesize',
'log_errors_max_len'
),
'php_flag' => array(
'short_open_tag',
'asp_tags',
'display_errors',
'display_startup_errors',
'log_errors',
'track_errors',
'html_errors',
'magic_quotes_gpc',
'magic_quotes_runtime',
'magic_quotes_sybase'
),
'php_admin_value' => array(
'precision',
'output_buffering',
'disable_functions',
'max_input_time',
'memory_limit',
'post_max_size',
'variables_order',
'gpc_order',
'date.timezone'
),
'php_admin_flag' => array(
'allow_call_time_pass_reference',
'allow_url_fopen',
'cgi.force_redirect',
'enable_dl',
'expose_php',
'ignore_repeated_errors',
'ignore_repeated_source',
'report_memleaks',
'register_argc_argv',
'file_uploads',
'allow_url_fopen'
)
);
/**
@@ -297,10 +336,10 @@ class phpinterface_fpm
*/
public function getAliasConfigDir($createifnotexists = true)
{
// ensure default...
if (!isset($this->_settings['phpfpm']['aliasconfigdir'])) {
$this->_settings['phpfpm']['aliasconfigdir'] = '/var/www/php-fpm';
}
// ensure default...
if (!isset($this->_settings['phpfpm']['aliasconfigdir'])) {
$this->_settings['phpfpm']['aliasconfigdir'] = '/var/www/php-fpm';
}
$configdir = makeCorrectDir($this->_settings['phpfpm']['aliasconfigdir'] . '/' . $this->_domain['loginname'] . '/' . $this->_domain['domain'] . '/');
if(!is_dir($configdir) && $createifnotexists)