From bd62c565c02e0ae21374e100e8e007e6451159c0 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sun, 9 Jul 2017 22:13:51 +0200 Subject: [PATCH] Various fixes in pools templates --- .../templates/etc/php-fpm.d/shares.conf/10Shares | 17 +++++++++-------- .../templates/etc/php-fpm.d/www.conf/00Default00Header | 1 + .../templates/etc/php-fpm.d/www.conf/00Default40Paths | 4 ++-- .../etc/php-fpm.d/www.conf/00Default50Settings | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/root/etc/e-smith/templates/etc/php-fpm.d/shares.conf/10Shares b/root/etc/e-smith/templates/etc/php-fpm.d/shares.conf/10Shares index 924f8e5..d2585bf 100644 --- a/root/etc/e-smith/templates/etc/php-fpm.d/shares.conf/10Shares +++ b/root/etc/e-smith/templates/etc/php-fpm.d/shares.conf/10Shares @@ -8,6 +8,7 @@ foreach my $share ($a->get_all_by_prop(type => 'share')){ next if (($share->prop('DynamicContent') || 'disabled') ne 'enabled'); my $memory_limit = $share->prop('PHPMemoryLimit') || '128M'; my $max_execution_time = $share->prop('PHPMaxExecutionTime') || '30'; + my $max_input_time = $share->prop('PHPMaxInputTime') || '60'; my $allow_url_fopen = $share->prop('PHPAllowUrlFopen') || 'disabled'; my $post_max_size = $share->prop('PHPPostMaxSize') || '10M'; my $upload_max_filesize = $share->prop('PHPUploadMaxFilesize') || '10M'; @@ -40,27 +41,27 @@ pm.min_spare_servers = 3 pm.max_spare_servers = 4 pm.max_requests = 5000 request_terminate_timeout = 30 +slowlog = /var/log/php/$pool_name/slow.log php_admin_value[session.save_path] = /var/lib/php/$pool_name/session -php_value[soap.wsdl_cache_dir] = /var/lib/php/$pool_name/wsdlcache -php_value[opcache.file_cache] = /var/lib/php/$pool_name/opcache +php_admin_value[soap.wsdl_cache_dir] = /var/lib/php/$pool_name/wsdlcache +php_admin_value[opcache.file_cache] = /var/lib/php/$pool_name/opcache php_admin_value[upload_tmp_dir] = /var/lib/php/$pool_name/tmp -php_admin_value[error_log] = /var/log/php/php/error.log -slowlog = /var/log/php/$pool_name/slow.log +php_admin_value[error_log] = /var/log/php/$pool_name/error.log php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName } -php_flag[display_errors] = off +php_admin_flag[display_errors] = off php_admin_flag[log_errors] = on php_admin_value[error_log] = syslog php_admin_value[memory_limit] = $memory_limit php_admin_value[max_execution_time] = $max_execution_time php_admin_value[post_max_size] = $post_max_size php_admin_value[upload_max_filesize] = $upload_max_filesize -php_admin_value[max_input_time] = 60 +php_admin_value[max_input_time] = $max_input_time php_admin_value[disable_functions] = $disabled_functions php_admin_flag[allow_url_fopen] = $allow_url_fopen -php_admin_flag[file_upload] = +php_admin_flag[file_upload] = $file_upload php_admin_flag[session.cookie_httponly] = on php_admin_flag[allow_url_include] = off -php_value[session.save_handler] = files +php_admin_value[session.save_handler] = files _EOF } diff --git a/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default00Header b/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default00Header index b707016..c1ded8b 100644 --- a/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default00Header +++ b/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default00Header @@ -6,6 +6,7 @@ my $php = $c->get( $srv ); if ($php){ $MemoryLimit = $php->prop('MemoryLimit') || '128M'; $MaxExecutionTime = $php->prop('MaxExecutionTime') || '30'; + $MaxInputTime = $php->prop('MaxInputTime') || '60'; $AllowUrlFopen = $php->prop('AllowUrlFopen') || 'off'; $MaxChildren = $php->prop('MaxChildren') || '15'; $PostMaxSize = $php->prop('PostMaxSize') || '10M'; diff --git a/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default40Paths b/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default40Paths index 70faf96..c8baafd 100644 --- a/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default40Paths +++ b/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default40Paths @@ -1,8 +1,8 @@ { $OUT .=<<_EOF; php_admin_value[session.save_path] = /var/lib/php/php$PHP_VERSION/session -php_value[soap.wsdl_cache_dir] = /var/lib/php/php$PHP_VERSION/wsdlcache -php_value[opcache.file_cache] = /var/lib/php/php$PHP_VERSION/opcache +php_admin_value[soap.wsdl_cache_dir] = /var/lib/php/php$PHP_VERSION/wsdlcache +php_admin_value[opcache.file_cache] = /var/lib/php/php$PHP_VERSION/opcache php_admin_value[upload_tmp_dir] = /var/lib/php/php$PHP_VERSION/tmp _EOF } diff --git a/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default50Settings b/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default50Settings index 9ecb653..d9f9495 100644 --- a/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default50Settings +++ b/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default50Settings @@ -1,5 +1,5 @@ php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName } -php_flag[display_errors] = off +php_admin_flag[display_errors] = off php_admin_flag[log_errors] = on php_admin_value[error_log] = syslog php_admin_value[memory_limit] = { $MemoryLimit } @@ -19,4 +19,4 @@ php_admin_flag[allow_url_fopen] = { $AllowUrlFopen } php_admin_flag[file_upload] = { $FileUpload } php_admin_flag[session.cookie_httponly] = on php_admin_flag[allow_url_include] = off -php_value[session.save_handler] = files +php_admin_value[session.save_handler] = files