Ansible
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

php

Source Code Build Status GitHub

Role to setup PHP.


Default Variables

php_allow_url_fopen

Default value

php_allow_url_fopen: On

php_apc_enable_cli

Default value

php_apc_enable_cli: '1'

php_apc_enabled

Default value

php_apc_enabled: true

php_apc_shm_size

Default value

php_apc_shm_size: 96M

php_apt_cache_update

Automatically update apt cache on package installations. This setting will only applied on apt-based operating systems e.g. Ubuntu.

Default value

php_apt_cache_update: false

php_date_timezone

Default value

php_date_timezone: America/Chicago

php_default_socket_timeout

Default value

php_default_socket_timeout: '{{ php_max_execution_time }}'

php_default_version

Default value

php_default_version: '7.4'

php_disable_functions

Default value

php_disable_functions: []

php_display_errors

Default value

php_display_errors: Off

php_display_startup_errors

Default value

php_display_startup_errors: Off

php_error_reporting

Default value

php_error_reporting: E_ALL & ~E_DEPRECATED & ~E_STRICT

php_expose_php

Default value

php_expose_php: On

php_file_uploads

Default value

php_file_uploads: On

php_max_execution_time

Default value

php_max_execution_time: '3600'

php_max_file_uploads

Default value

php_max_file_uploads: '20'

php_max_input_time

Default value

php_max_input_time: '{{ php_max_execution_time }}'

php_max_input_vars

Default value

php_max_input_vars: '1000'

php_memory_limit

Default value

php_memory_limit: 256M

php_opcache_blacklist_filename

Default value

php_opcache_blacklist_filename: ''

php_opcache_enable_cli

Default value

php_opcache_enable_cli: '1'

php_opcache_enabled

Default value

php_opcache_enabled: true

php_opcache_interned_strings_buffer

Default value

php_opcache_interned_strings_buffer: '16'

php_opcache_max_accelerated_files

Default value

php_opcache_max_accelerated_files: '4096'

php_opcache_max_file_size

Default value

php_opcache_max_file_size: '0'

php_opcache_max_wasted_percentage

Default value

php_opcache_max_wasted_percentage: '5'

php_opcache_memory_consumption

Default value

php_opcache_memory_consumption: '96'

php_opcache_revalidate_freq

Default value

php_opcache_revalidate_freq: '2'

php_opcache_revalidate_path

Default value

php_opcache_revalidate_path: '0'

php_opcache_validate_timestamps

Default value

php_opcache_validate_timestamps: '1'

php_output_buffering

Default value

php_output_buffering: '4096'

php_packages_extra

Can be used to install other dependency packages e.g. gcc (required by pecl).

Default value

php_packages_extra: []

php_packages_state

Use present to make sure it’s installed, or latest if you want to upgrade.

Default value

php_packages_state: present

php_post_max_size

Default value

php_post_max_size: 32M

php_realpath_cache_size

Default value

php_realpath_cache_size: 32K

php_sendmail_path

Default value

php_sendmail_path: /usr/sbin/sendmail -t -i

Default value

php_session_cookie_lifetime: 0

php_session_gc_divisor

Default value

php_session_gc_divisor: 1000

php_session_gc_maxlifetime

Default value

php_session_gc_maxlifetime: 1440

php_session_gc_probability

Default value

php_session_gc_probability: 1

php_session_save_handler

Default value

php_session_save_handler: files

php_session_save_path

Default value

php_session_save_path: ''

php_short_open_tag

Default value

php_short_open_tag: Off

php_upload_max_filesize

Default value

php_upload_max_filesize: 64M

php_webserver_enabled

Set this to False if you’re not using PHP with a webserver e.g. Apache/Nginx.

Default value

php_webserver_enabled: true

Dependencies

None.