Description
This role provides base for a PHP installation.
Requirements
Variables
-
php_config_file
- description:
- This option specifies the configuration, that should be used.
- It can be a custom template or file.
- default: "php.ini.j2"
- description:
-
php_config_file_path
- description:
- This option specifies the system path for the configuration file.
- The path is system specific and is defined in the system specific variable file.
- default: "{{ system_config_directory }}/php.ini"
- description:
-
php_module_config_directory
- description:
- This option contians the main path for all module configuration files.
- default: "{{ system_config_directory }}/php.d"
- description:
-
php_clone_config_paths
- description:
- Some systems providexs different configuration paths for PHP-using tools.
- This option is a list of dictionaries, which contains this pathes.
- If it is defined, all specified paths will be linked to
php_module_config_directory
andphp_config_file_path
.
- default: undefined
- keys:
- file
- description:
- This key specifies the path of the PHP configuration file to be linked with
php_config_file_path
.
- This key specifies the path of the PHP configuration file to be linked with
- default: undefined
- description:
- configdir
- description:
- This key specifies the main path for all module configuration files to be linked with
php_module_config_directory
- This key specifies the main path for all module configuration files to be linked with
- default: undefined
- description:
- file
- description:
-
php_engine_enabled
- description:
- Enable the PHP scripting language engine under Apache.
- choices: [true, false]
- default: true
- description:
-
php_short_open_tag
- description:
- This directive determines whether or not PHP will recognize code between and ?> tags as PHP source which should be processed as such.
- choices: [true, false]
- default: false
- description:
-
php_precision
- description:
- The number of significant digits displayed in floating point numbers.
- default: 14
- description:
-
php_output_buffering
- description:
- Output buffering is a mechanism for controlling how much output data excluding headers and cookies) PHP should keep internally before pushing that data to the client.
- The value is given in byte.
- default: 4096
- description:
-
php_output_handler
- description:
- This option allows the redirect all of the output of scripts to a function.
- default: ""
- description:
-
php_implicit_flush
- description:
- Implicit flush tells PHP to tell the output layer to flush itself automatically after every output block.
- choices: [true, false]
- default: false
- description:
-
php_unserialize_callback_func
- description:
- The unserialize callback function will be called, if the unserializer finds an undefined class which should be instantiated
- default: ""
- description:
-
php_unserialize_max_depth
- description:
- The unserialize_max_depth specifies the default depth limit for unserialized structures.
- A value of 0 disables the depth limit.
- default: 4096
- description:
-
php_serialize_precision
- description:
- When floats & doubles are serialized, store serialize_precision significant digits after the floating point.
- If -1 is used, then dtoa mode 0 is used which automatically select the best precision.
- default: -1
- description:
-
php_open_basedir
- description:
- If this option is set, limits all file operations to the defined directory and below.
- default: ""
- description:
-
php_disable_functions
- description:
- This option contains a list of certain functions to be disabled.
- default: []
- description:
-
php_disable_classes
- description:
- This option contains a list of certain classes to be disabled.
- default: []
- description:
-
php_ignore_user_abort
- description:
- If enabled, the request will be allowed to complete even if the user aborts the request.
- choices: [true, false]
- default: true
- description:
-
php_realpath_cache_size
- description:
- This option determines the size of the realpath cache to be used by PHP.
- default: "4096k"
- description:
-
php_realpath_cache_ttl
- description:
- This option contains the duration of time, in seconds for which to cache realpath information for a given file or directory.
- default: 120
- description:
-
php_expose_php
- description:
- Decides whether PHP may expose the fact that it is installed on the server.
- choices: [true, false]
- default: true
- description:
-
php_max_execution_time
- description:
- Maximum execution time of each script, in seconds.
- default: 30
- description:
-
php_max_input_time
- description:
- Maximum amount of time each script may spend parsing request data.
- default: 60
- description:
-
php_max_input_nesting_level
- description:
- Maximum input variable nesting level
- default: 64
- description:
-
php_max_input_vars
- description:
- How many GET/POST/COOKIE input variables may be accepted
- default: 1000
- description:
-
php_memory_limit
- description:
- Maximum amount of memory a script may consume
- default: 128M
- description:
-
php_error_reporting
- description:
- This directive informs PHP of which errors, warnings and notices you would like it to take action for.
- default: "E_ALL & ~E_DEPRECATED & ~E_STRICT"
- description:
-
php_display_errors
- description:
- This directive controls whether or not and where PHP will output errors, notices and warnings too.
- choices: [true, false]
- default: false
- description:
-
php_display_startup_errors
- description:
- The display of errors which occur during PHP's startup sequence are handled separately from display_errors.
- choices: [true, false]
- default: false
- description:
-
php_log_errors
- description:
- Besides displaying errors, PHP can also log errors to locations.
- choices: [true, false]
- default: true
- description:
-
php_ignore_repeated_errors
- description:
- Do not log repeated messages.
- choices: [true, false]
- default: false
- description:
-
php_ignore_repeated_source
- description:
- Ignore source of message when ignoring repeated messages.
- choices: [true, false]
- default: false
- description:
-
php_report_memleaks
- description:
- If this parameter is set to Off, then memory leaks will not be shown.
- choices: [true, false]
- default: true
- description:
-
php_xmlrpc_errors
- description:
- If enabled, turns off normal error reporting and formats errors as XML-RPC error message.
- choices: [true, false]
- default: false
- description:
-
xmlrpc_error_number
- description:
- Used as the value of the XML-RPC faultCode element.
- default: 0
- description:
-
php_html_errors
- description:
- When PHP displays or logs an error, it has the capability of formatting the error message as HTML for easier reading.
- choices: [true, false]
- default: true
- description:
-
php_docref_root
- description:
- If html_errors is set to On and docref_root is not empty, then PHP produces clickable error messages that direct to a page describing the error or function causing the error in detail.
- default: ""/phpmanual/"
- description:
-
php_docref_ext
- description:
- This option contains the extension of the
docref
-documents. - The value must begin with a dot ".".
- This option contains the extension of the
- default: ".html"
- description:
-
php_error_prepend_string
- description:
- String to output before an error message.
- default: "<span style='color: #ff0000'>"
- description:
-
php_error_log
- description:
- Name of the file where script errors should be logged.
- The special value
syslog
is used, the errors are sent to the system logger instead.
- default: syslog
- description:
-
php_variables_order
- description:
- This option determines which super global arrays are registered when PHP starts up.
- default: "GPCS"
- description:
-
php_request_order
- description:
- This option determines which super global data should be registered into the super global array REQUEST.
- default: "GP"
- description:
-
php_register_argc_argv
- description:
- This option determines whether PHP registers $argv & $argc each time it runs.
- choices: [true, false]
- default: false
- description:
-
php_auto_globals_jit
- description:
- When enabled, the ENV, REQUEST and SERVER variables are created when they are first used (Just In Time) instead of when the script starts.
- choices: [true, false]
- default: true
- description:
-
php_enable_post_data_reading
- description:
- Whether PHP will read the POST data.
- choices: [true, false]
- default: true
- description:
-
php_post_max_size
- description:
- Maximum size of POST data that PHP will accept.
- default: "8M"
- description:
-
php_auto_prepend_file
- description:
- Automatically add files before PHP document.
- default: ""
- description:
-
php_auto_append_file
- description:
- Automatically add files after PHP document.
- default: ""
- description:
-
php_default_mimetype
- description:
- PHP will output a media type using the Content-Type header.
- default: "text/html"
- description:
-
php_default_charset
- description:
- PHP's default character set.
- default: "UTF-8"
- description:
-
php_internal_encoding
- description:
- PHP internal character encoding.
- If empty,
php_default_charset
is used.
- default: ""
- description:
-
php_input_encoding
- description:
- PHP input character encoding
- If empty,
php_default_charset
is used.
- default: ""
- description:
-
php_output_encoding
- description:
- PHP output character encoding
- If empty,
php_default_charset
is used.
- default: ""
- description:
-
php_doc_root
- description:
- The root of the PHP pages, used only if nonempty.
- default: ""
- description:
-
php_user_dir
- description:
- The directory under which PHP opens the script using /~username.
- Used only if nonempty.
- default: ""
- description:
-
php_extension_dir
- description:
- Directory in which the loadable extensions (modules) reside.
- default: ""
- description:
-
sys_temp_dir
- description:
- Directory where the temporary files should be placed.
- default: "/tmp"
- description:
-
php_enable_dl
- description:
- Whether or not to enable the dl() function.
- choices: [true, false]
- default: false
- description:
-
php_file_uploads
- description:
- Whether to allow HTTP file uploads.
- choices: [true, false]
- default: true
- description:
-
php_upload_tmp_dir
- description:
- Temporary directory for HTTP uploaded files
- will use system default if not specified or empty
- default: ""
- description:
-
php_upload_max_filesize
- description:
- Maximum allowed size for uploaded files.
- default: "2M"
- description:
-
php_max_file_uploads
- description:
- Maximum number of files that can be uploaded via a single request.
- default: 20
- description:
-
php_allow_url_fopen
-
php_allow_url_include
-
php_from
- description:
- Define the anonymous ftp password (your email address).
- default: ""
- description:
-
php_user_agent
- description:
- Define the User-Agent string.
- default: ""
- description:
-
php_default_socket_timeout
- description:
- Default timeout for socket based streams (seconds)
- default: 60
- description:
-
php_auto_detect_line_endings
- description:
- Setting this option will cause PHP to automatically detect the EOL character in those files so that fgets() and file() will work regardless of the source of the file.
- choices: [true, false]
- default: false
- description:
-
php_user_ini
- description:
- A dictionary with setttings for an user-defined php.ini (.htaccess) files.
- keys:
- filename
- description:
- Name for user-defined php.ini (.htaccess) files.
- default: ""
- description:
- cache_ttl
- description:
- TTL for user-defined php.ini files (time-to-live) in seconds.
- default: 300
- description:
- filename
- description:
-
php_highlight
- description:
- A dictionary with color settings for Syntax Highlighting mode.
- keys:
- string
- description:
- color for strings
- default: "#DD0000"
- description:
- comment
- description:
- color for comments
- default: "#FF9900"
- description:
- keyword
- description:
- color for keywords
- default: "#007700"
- description:
- default
- description:
- color for default
- default: "#0000BB"
- description:
- html
- description:
- color for html code
- default: "#0000BB"
- description:
- string
- description:
-
php_zend
- description:
- A dictionary with settings for Zend framework.
- keys:
- enable_gc:
- description:
- Enables or disables the circular reference collector.
- choices: [true, false]
- default: true
- description:
- multibyte
- description:
- If enabled, scripts may be written in encodings that are incompatible with the scanner
- choices: [true, false]
- default: false
- description:
- script_encoding
- description:
- Allows to set the default encoding for the scripts.
- default: ""
- description:
- exception_ignore_args
- description:
- Allows to include or exclude arguments from stack traces generated for exceptions.
- choices: [true, false]
- default: true
- description:
- exception_string_param_max_len
- description:
- Allows setting the maximum string length in an argument of a stringified stack trace
- The value can be between 0 and 1000000.
- default: 0
- description:
- enable_gc:
- description:
-
php_syslog
- description:
- A dictionary with settings for the system logger.
- Only used when
php_error_log
is set tosyslog
.
- keys:
- ident
- description:
- The syslog ident is a string which is prepended to every message logged to syslog.
- default: "php"
- description:
- facility
- description:
- The syslog facility is used to specify what type of program is logging the message.
- default: "user"
- description:
- filter
- description:
- Set this to disable filtering control characters.
- default: "ascii"
- description:
- ident
- description:
-
php_arg_separator
- description:
- A dictionary with settings for separator used in PHP to separate arguments.
- keys:
- output
- description:
- The separator used in PHP generated URLs to separate arguments.
- default: "&"
- description:
- input:
- description:
- List of separator(s) used by PHP to parse input URLs into variables.
- default: "&"
- description:
- output
- description:
-
php_cgi
- description:
- A dictionary with PHP CGI settings.
- keys:
- force_redirect
- description:
- It is necessary to provide security running PHP as a CGI under most web servers.
- choices: [true, false]
- default: true
- description:
- nph
- description:
- If this option is enabled it will force cgi to always sent Status: 200 with every request.
- choices: [true, false]
- default: true
- description:
- redirect_status_env
- description:
- If this option is turned on, and you are not running under Apache or Netscape (iPlanet) web servers, you MAY need to set an environment variable name that PHP will look for to know it is OK to continue execution.
- default: ""
- description:
- fix_pathinfo
- description:
- This option enables the real PATH_INFO/PATH_TRANSLATED support for CGI
- choices: [true, false]
- default: true
- description:
- discard_path
- description:
- If this option is enabled, the PHP CGI binary can safely be placed outside of the web tree and people will not be able to circumvent .htaccess security.
- choices: [true, false]
- default: true
- description:
- rfc2616_headers
- description:
- This option tells PHP what type of headers to use when sending HTTP response code.
- default: 0
- description:
- check_shebang_line
- description:
- This option controls whether CGI PHP checks for line starting with
#!
at the top of the running script.
- This option controls whether CGI PHP checks for line starting with
- choices: [true, false]
- default: true
- description:
- force_redirect
- description:
-
php_fastcgi
- description:
- A dictionary with PHP FastCGI settings.
- keys:
- impersonate
- description:
- FastCGI under IIS supports the ability to impersonate security tokens of the calling client.
- default: 0
- description:
- logging
- description:
- Disable logging through FastCGI connection.
- choices: [true, false]
- default: true
- description:
- impersonate
- description:
-
php_extensions
- description:
- A list of PHP extensions to be installed.
- Use this option to install all needed extensions.
- default: []
- description:
-
php_default_user
- description:
- A default user for PHP and its subroles.
- default: "daemon"
- description:
-
php_default_group
- description:
- A default group for PHP and its subroles.
- default: "daemon"
- description:
Processes
main
- collect system packages of all desired modules
- invoke inherited main tasks
- create root directory for the PHP configuration
configure
- configure PHP
- configure all desired PHP modules
- clone configuration directories
License
BSD-3-Clauses
Contributors
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
- firstname lastname