php
Role to setup PHP.
- Default Variables
- php_allow_url_fopen
- php_apc_enable_cli
- php_apc_enabled
- php_apc_shm_size
- php_apt_cache_update
- php_date_timezone
- php_default_socket_timeout
- php_default_version
- php_disable_functions
- php_display_errors
- php_display_startup_errors
- php_error_reporting
- php_expose_php
- php_file_uploads
- php_max_execution_time
- php_max_file_uploads
- php_max_input_time
- php_max_input_vars
- php_memory_limit
- php_opcache_blacklist_filename
- php_opcache_enable_cli
- php_opcache_enabled
- php_opcache_interned_strings_buffer
- php_opcache_max_accelerated_files
- php_opcache_max_file_size
- php_opcache_max_wasted_percentage
- php_opcache_memory_consumption
- php_opcache_revalidate_freq
- php_opcache_revalidate_path
- php_opcache_validate_timestamps
- php_output_buffering
- php_packages_extra
- php_packages_state
- php_post_max_size
- php_realpath_cache_size
- php_sendmail_path
- php_session_cookie_lifetime
- php_session_gc_divisor
- php_session_gc_maxlifetime
- php_session_gc_probability
- php_session_save_handler
- php_session_save_path
- php_short_open_tag
- php_upload_max_filesize
- php_webserver_enabled
- Dependencies
php_allow_url_fopen: On
php_apc_enable_cli: '1'
php_apc_enabled: true
php_apc_shm_size: 96M
Automatically update apt cache on package installations. This setting will only applied on apt-based operating systems e.g. Ubuntu.
php_apt_cache_update: false
php_date_timezone: America/Chicago
php_default_socket_timeout: '{{ php_max_execution_time }}'
php_default_version: '7.4'
php_disable_functions: []
php_display_errors: Off
php_display_startup_errors: Off
php_error_reporting: E_ALL & ~E_DEPRECATED & ~E_STRICT
php_expose_php: On
php_file_uploads: On
php_max_execution_time: '3600'
php_max_file_uploads: '20'
php_max_input_time: '{{ php_max_execution_time }}'
php_max_input_vars: '1000'
php_memory_limit: 256M
php_opcache_blacklist_filename: ''
php_opcache_enable_cli: '1'
php_opcache_enabled: true
php_opcache_interned_strings_buffer: '16'
php_opcache_max_accelerated_files: '4096'
php_opcache_max_file_size: '0'
php_opcache_max_wasted_percentage: '5'
php_opcache_memory_consumption: '96'
php_opcache_revalidate_freq: '2'
php_opcache_revalidate_path: '0'
php_opcache_validate_timestamps: '1'
php_output_buffering: '4096'
Can be used to install other dependency packages e.g. gcc (required by pecl).
php_packages_extra: []
Use present
to make sure it’s installed, or latest
if you want to upgrade.
php_packages_state: present
php_post_max_size: 32M
php_realpath_cache_size: 32K
php_sendmail_path: /usr/sbin/sendmail -t -i
php_session_cookie_lifetime: 0
php_session_gc_divisor: 1000
php_session_gc_maxlifetime: 1440
php_session_gc_probability: 1
php_session_save_handler: files
php_session_save_path: ''
php_short_open_tag: Off
php_upload_max_filesize: 64M
Set this to False
if you’re not using PHP with a webserver e.g. Apache/Nginx.
php_webserver_enabled: true
None.