[zabbix]
user = {{ zabbix_php_fpm_conf_user }}
group = {{ zabbix_php_fpm_conf_group }}

listen = {{ zabbix_php_fpm_listen }}
{% if zabbix_php_fpm_conf_listen and ansible_facts['os_family'] not in ['Debian', 'Suse'] %}
listen.acl_users = {{ zabbix_php_fpm_conf_user }}
{% endif %}
listen.owner = {{ zabbix_php_fpm_conf_user }}
listen.group = {{ _nginx_group if zabbix_web_http_server=='nginx' else _apache_group }}
listen.mode = 0660
listen.allowed_clients = 127.0.0.1

pm = {{ zabbix_web_php_fpm_mode }}
pm.max_children = {{ zabbix_web_php_fpm_max_childs }}
pm.start_servers = {{ zabbix_web_php_fpm_start_servers }}
pm.min_spare_servers = {{ zabbix_web_php_fpm_min_spare_servers }}
pm.max_spare_servers = {{ zabbix_web_php_fpm_max_spare_servers }}

php_value[session.save_handler] = files
php_value[session.save_path]    = {{ zabbix_php_fpm_session }}

php_value[max_execution_time] = {{ zabbix_web_max_execution_time | default('300') }}
php_value[memory_limit] = {{ zabbix_web_memory_limit | default('128M') }}
php_value[post_max_size] = {{ zabbix_web_post_max_size | default('16M') }}
php_value[upload_max_filesize] = {{ zabbix_web_upload_max_filesize | default('2M') }}
php_value[max_input_time] = {{ zabbix_web_max_input_time | default('300') }}
php_value[max_input_vars] = {{ zabbix_web_max_input_vars | default('10000') }}
php_value[date.timezone] = {{ zabbix_timezone }}


{% if zabbix_web_custom_php | default('') | length > 0 %}
{{ zabbix_web_custom_php }}
{% endif %}