diff --git a/bundles/php/files/8.0/fpm.conf b/bundles/php/files/8.0/fpm.conf index c4d6412..2de6015 100644 --- a/bundles/php/files/8.0/fpm.conf +++ b/bundles/php/files/8.0/fpm.conf @@ -21,3 +21,7 @@ pm.max_spare_servers=${num_cpus*2} pm.min_spare_servers=${num_cpus} pm.process_idle_timeout=30s pm.max_requests=1024 + +% if not clear_env: +clear_env=no +% endif diff --git a/bundles/php/files/8.0/php.ini b/bundles/php/files/8.0/php.ini index 45b78bf..c8ef0e9 100644 --- a/bundles/php/files/8.0/php.ini +++ b/bundles/php/files/8.0/php.ini @@ -14,7 +14,7 @@ expose_php = Off max_execution_time = 30 max_input_time = 60 -memory_limit = 256M +memory_limit = ${memory_limit}M error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT display_startup_errors = Off diff --git a/bundles/php/items.py b/bundles/php/items.py index 144ccca..f4479d7 100644 --- a/bundles/php/items.py +++ b/bundles/php/items.py @@ -6,6 +6,7 @@ files = { 'content_type': 'mako', 'context': { 'num_cpus': node.metadata['vm']['cpu'], + 'clear_env': node.metadata.get('php/clear_env', True), }, 'needs': { # "all php packages" @@ -17,9 +18,11 @@ files = { }, f'/etc/php/{version}/fpm/php.ini': { 'source': f'{version}/php.ini', + 'content_type': 'mako', 'context': { 'num_cpus': node.metadata['vm']['cpu'], 'post_max_size': node.metadata['php'].get('post_max_size', 10), + 'memory_limit': node.metadata.get('php/memory_limit', 256), }, 'needs': { # "all php packages" @@ -31,9 +34,11 @@ files = { }, f'/etc/php/{version}/cli/php.ini': { 'source': f'{version}/php.ini', + 'content_type': 'mako', 'context': { 'num_cpus': node.metadata['vm']['cpu'], 'post_max_size': node.metadata['php'].get('post_max_size', 10), + 'memory_limit': node.metadata.get('php/memory_limit', 256), }, 'needs': { # "all php packages"