Read defalt pool settings from the DB

tags/0.0.1_0.fc26_el5
Daniel Berteaud 7 years ago
parent 9d5481ddfb
commit 3cff192c10
  1. 16
      root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default00Header
  2. 6
      root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default30Childrens
  3. 8
      root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default40Paths
  4. 18
      root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default50Settings

@ -1 +1,17 @@
{
use esmith::ConfigDB;
my $c = esmith::ConfigDB->open_ro || die "Couldn't opeen the configuration database\n";
my $php = $c->get( 'php' . $PHP_VERSION );
if ($php){
$MemoryLimit = $php->prop('MemoryLimit') || '128M';
$MaxExecutionTime = $php->prop('MaxExecutionTime') || '30';
$AllowUrlFopen = $php->prop('AllowUrlFopen') || 'off';
$MaxChildren = $php->prop('MaxChildren') || '15';
$PostMaxSize = $php->prop('PostMaxSize') || '10M';
$UploadMaxFilesize = $php->prop('UploadMaxFilesize') || '10M';
$OpenBasedir = $php->prop('OpenBasedir') || undef;
$DisableFunctions = $php->prop('DisableFunctions') || undef;
}
return "";
}
[php{ $PHP_VERSION }] [php{ $PHP_VERSION }]

@ -1,7 +1,7 @@
pm = dynamic pm = dynamic
pm.max_children = 15 pm.max_children = { $MaxChildren }
pm.start_servers = 3 pm.start_servers = 3
pm.min_spare_servers = 3 pm.min_spare_servers = 3
pm.max_spare_servers = 6 pm.max_spare_servers = 4
pm.max_requests = 5000 pm.max_requests = 5000
request_terminate_timeout = 5m request_terminate_timeout = { $MaxExecutionTime }

@ -1,9 +1,9 @@
{ {
my $var_lib = ( $PHP_VERSION eq '56' ) ? '/opt/remi/php56/root/var/lib/php' : '/var/opt/remi/php' . $PHP_VERSION . '/lib/php';
$OUT .=<<_EOF; $OUT .=<<_EOF;
php_admin_value[session.save_path] = $var_lib/session php_admin_value[session.save_path] = /var/lib/php/php$PHP_VERSION/session
php_value[soap.wsdl_cache_dir] = $var_lib/wsdlcache php_value[soap.wsdl_cache_dir] = /var/lib/php/php$PHP_VERSION/wsdlcache
php_value[opcache.file_cache] = $var_lib/opcache php_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 _EOF
} }
php_admin_value[error_log] = /var/log/php/php{ $PHP_VERSION }/error.log php_admin_value[error_log] = /var/log/php/php{ $PHP_VERSION }/error.log

@ -2,5 +2,21 @@ php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName }
php_flag[display_errors] = off php_flag[display_errors] = off
php_admin_flag[log_errors] = on php_admin_flag[log_errors] = on
php_admin_value[error_log] = syslog php_admin_value[error_log] = syslog
php_admin_value[memory_limit] = 128M php_admin_value[memory_limit] = { $MemoryLimit }
php_admin_value[max_execution_time] = { $MaxExecutionTime }
php_admin_value[post_max_size] = { $PostMaxSize }
php_admin_value[upload_max_filesize] = { $UploadMaxFilesize }
php_admin_value[max_input_time] = { $MaxInputTime }
{
if ($OpenBasedir){
$OUT .= "php_admin_value[open_basedir] = " . join( ':', (split(/[;,:]/, $OpenBasedir)) ) . "\n";
}
if ($DisableFunctions){
$OUT .= "php_admin_value[disable_functions] = " . join( ', ', (split(/[;,:]/, $DisableFunctions)) ) . "\n";
}
}
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_value[session.save_handler] = files

Loading…
Cancel
Save