view modules/php/REFERENCE.md @ 447:1a9de0661666

Add missing package/dir for minimal Ubuntu Minimal is minimal - no locale, no cron, and some dirs do not exist
author IBBoard <dev@ibboard.co.uk>
date Mon, 08 May 2023 19:24:20 +0100
parents 3fce34f642f1
children adf6fe9bbc17
line wrap: on
line source

# Reference

<!-- DO NOT EDIT: This document was generated by Puppet Strings -->

## Table of Contents

### Classes

* [`php`](#php): Base class with global configuration parameters that pulls in all enabled components.  === Parameters  [*ensure*]   Specify which version of 
* [`php::apache_config`](#phpapache_config): Install and configure php apache settings  === Parameters  [*inifile*]   The path to the ini php-apache ini file  [*settings*]   Hash with ne
* [`php::cli`](#phpcli): Install and configure php CLI  === Parameters  [*inifile*]   The path to the ini php5-cli ini file  [*settings*]   Hash with nested hash of k
* [`php::composer`](#phpcomposer): Install composer package manager  === Parameters  [*source*]   Holds URL to the Composer source file  [*path*]   Holds path to the Composer e
* [`php::composer::auto_update`](#phpcomposerauto_update): Install composer package manager  === Parameters  [*max_age*]   Defines number of days after which Composer should be updated  [*source*]   H
* [`php::dev`](#phpdev): Install the development package with headers for PHP  === Parameters  [*ensure*]   The PHP ensure of PHP dev to install  [*package*]   The pa
* [`php::embedded`](#phpembedded): Install and configure php embedded SAPI  === Parameters  [*inifile*]   The path to the ini php5-embeded ini file  [*settings*]   Hash with ne
* [`php::fpm`](#phpfpm): Install and configure mod_php for fpm  === Parameters  [*user*]   The user that php-fpm should run as  [*group*]   The group that php-fpm sho
* [`php::fpm::config`](#phpfpmconfig): Configure php-fpm service  === Parameters  [*config_file*]   The path to the fpm config file  [*user*]   The user that runs php-fpm  [*group*
* [`php::fpm::service`](#phpfpmservice): Manage fpm service  === Parameters  [*service_name*]   name of the php-fpm service  [*ensure*]   'ensure' value for the service  [*enable*]  
* [`php::global`](#phpglobal)
* [`php::globals`](#phpglobals)
* [`php::packages`](#phppackages): Install common PHP packages  === Parameters  [*ensure*]   Specify which version of PHP packages to install  [*names*]   List of the names of 
* [`php::params`](#phpparams): PHP params class
* [`php::pear`](#phppear): Install PEAR package manager  === Parameters  [*ensure*]   The package ensure of PHP pear to install and run pear auto_discover  [*package*] 
* [`php::phpunit`](#phpphpunit): Install phpunit, PHP testing framework  === Parameters  [*source*]   Holds URL to the phpunit source file  [*path*]   Holds path to the phpun
* [`php::phpunit::auto_update`](#phpphpunitauto_update): Install phpunit package manager  === Parameters  [*max_age*]   Defines number of days after which phpunit should be updated  [*source*]   Hol
* [`php::repo`](#phprepo): Configure package repository
* [`php::repo::debian`](#phprepodebian): Configure debian apt repo  === Parameters  [*location*]   Location of the apt repository  [*release*]   Release of the apt repository  [*repo
* [`php::repo::redhat`](#phpreporedhat)
* [`php::repo::suse`](#phpreposuse): Configure suse repo  === Parameters  [*reponame*]   Name of the Zypper repository  [*baseurl*]   Base URL of the Zypper repository
* [`php::repo::ubuntu`](#phprepoubuntu): Configure ubuntu ppa  === Parameters  [*version*]   PHP version to manage (e.g. 5.6)

### Defined types

* [`php::apache_vhost`](#phpapache_vhost): Configures an apache vhost for php  === Parameters  [*vhost*]   The vhost address  [*docroot*]   The vhost docroot  [*port*]   The vhost port
* [`php::config`](#phpconfig): Configure php.ini settings for a PHP SAPI  === Parameters  [*file*]   The path to ini file  [*config*]   Nested hash of key => value to apply
* [`php::config::setting`](#phpconfigsetting): Configure php.ini settings  === Parameters  [*key*]   The key of the value, like `ini_setting`  [*file*]   The path to ini file  [*value*]   
* [`php::extension`](#phpextension): Install a PHP extension package  === Parameters  [*ensure*]   The ensure of the package to install   Could be "present", "absent", "latest", 
* [`php::extension::config`](#phpextensionconfig): Configure a PHP extension package  === Parameters  [*ensure*]   The ensure of the package to install   Could be "latest", "installed" or a pi
* [`php::extension::install`](#phpextensioninstall): Install a PHP extension package  === Parameters  [*ensure*]   The ensure of the package to install   Could be "latest", "installed" or a pinn
* [`php::fpm::pool`](#phpfpmpool): Configure fpm pools  === Parameters  See the official php-fpm documentation for parameters that are not documented here: http://php.net/manua

### Functions

* [`ensure_prefix`](#ensure_prefix): This function ensures a prefix for all elements in an array or the keys in a hash.  *Examples:*    ensure_prefix({'a' => 1, 'b' => 2, 'p.c' =
* [`to_hash_settings`](#to_hash_settings): This function converts a +{key => value}+ hash into a nested hash and can add an id to the outer key. The optional id string as second parame

### Data types

* [`Php::ComposerChannel`](#phpcomposerchannel)
* [`Php::Duration`](#phpduration): A duration in seconds are with an unit
* [`Php::InstallOptions`](#phpinstalloptions)
* [`Php::Provider`](#phpprovider)
* [`Php::Sapi`](#phpsapi)

## Classes

### <a name="php"></a>`php`

Base class with global configuration parameters that pulls in all
enabled components.

=== Parameters

[*ensure*]
  Specify which version of PHP packages to install, defaults to 'present'.
  Please note that 'absent' to remove packages is not supported!

[*manage_repos*]
  Include repository (dotdeb, ppa, etc.) to install recent PHP from

[*fpm*]
  Install and configure php-fpm

[*fpm_service_enable*]
  Enable/disable FPM service

[*fpm_service_ensure*]
  Ensure FPM service is either 'running' or 'stopped'

[*fpm_service_name*]
  This is the name of the php-fpm service. It defaults to reasonable OS
  defaults but can be different in case of using php7.0/other OS/custom fpm service

[*fpm_service_provider*]
  This is the name of the service provider, in case there is a non
  OS default service provider used to start FPM.
  Defaults to 'undef', pick system defaults.

[*fpm_pools*]
  Hash of php::fpm::pool resources that will be created. Defaults
  to a single php::fpm::pool named www with default parameters.

[*fpm_global_pool_settings*]
  Hash of defaults params php::fpm::pool resources that will be created.
  Defaults to empty hash.

[*fpm_inifile*]
  Path to php.ini for fpm

[*fpm_package*]
  Name of fpm package to install

[*fpm_user*]
  The user that php-fpm should run as

[*fpm_group*]
  The group that php-fpm should run as

[*dev*]
  Install php header files, needed to install pecl modules

[*composer*]
  Install and auto-update composer

[*pear*]
  Install PEAR

[*phpunit*]
  Install phpunit

[*apache_config*]
  Manage apache's mod_php configuration

[*proxy_type*]
   proxy server type (none|http|https|ftp)

[*proxy_server*]
  specify a proxy server, with port number if needed. ie: https://example.com:8080.

[*extensions*]
  Install PHP extensions, this is overwritten by hiera hash `php::extensions`

[*package_prefix*]
  This is the prefix for constructing names of php packages. This defaults
  to a sensible default depending on your operating system, like 'php-' or
  'php5-'.

[*config_root_ini*]
  This is the path to the config .ini files of the extensions. This defaults
  to a sensible default depending on your operating system, like
  '/etc/php5/mods-available' or '/etc/php5/conf.d'.

[*config_root_inifile*]
  The path to the global php.ini file. This defaults to a sensible default
  depending on your operating system.

[*ext_tool_enable*]
  Absolute path to php tool for enabling extensions in debian/ubuntu systems.
  This defaults to '/usr/sbin/php5enmod'.

[*ext_tool_query*]
  Absolute path to php tool for querying information about extensions in
  debian/ubuntu systems. This defaults to '/usr/sbin/php5query'.

[*ext_tool_enabled*]
  Enable or disable the use of php tools on debian based systems
  debian/ubuntu systems. This defaults to 'true'.

[*log_owner*]
  The php-fpm log owner

[*log_group*]
  The group owning php-fpm logs

[*embedded*]
  Enable embedded SAPI

[*pear_ensure*]
  The package ensure of PHP pear to install and run pear auto_discover

[*settings*]
  PHP configuration parameters in php.ini files as a hash. For example,
  'Date/date.timezone' => 'Australia/Melbourne' sets data.timezone
  to 'Australia/Melbourne' under [Date] section, and
  'PHP/memory_limit' => '256M' sets memory_limit to 256M.

[*cli_settings*]
  Additional hash of PHP configuration parameters for PHP CLI. When a
  setting key already exists in $settings, the value provided from the
  $cli_settings parameter overrides the value from $settings parameter.
  For example, 'PHP/memory_limit' => '1000M' sets memory_limit to 1000M
  for the PHP cli ini file, regardless of the values from $settings.

[*pool_purge*]
  Whether to purge pool config files not created
  by this module

[*reload_fpm_on_config_changes*]
  by default, we reload the service on changes.
  But certain options, like socket owner, will only be applied during a restart.
  If set to false, a restart will be executed instead of a reload.
  This default will be changed in a future release.

#### Parameters

The following parameters are available in the `php` class:

* [`ensure`](#ensure)
* [`manage_repos`](#manage_repos)
* [`fpm`](#fpm)
* [`fpm_service_enable`](#fpm_service_enable)
* [`fpm_service_ensure`](#fpm_service_ensure)
* [`fpm_service_name`](#fpm_service_name)
* [`fpm_service_provider`](#fpm_service_provider)
* [`fpm_pools`](#fpm_pools)
* [`fpm_global_pool_settings`](#fpm_global_pool_settings)
* [`fpm_inifile`](#fpm_inifile)
* [`fpm_package`](#fpm_package)
* [`fpm_user`](#fpm_user)
* [`fpm_group`](#fpm_group)
* [`embedded`](#embedded)
* [`dev`](#dev)
* [`composer`](#composer)
* [`pear`](#pear)
* [`pear_ensure`](#pear_ensure)
* [`phpunit`](#phpunit)
* [`apache_config`](#apache_config)
* [`proxy_type`](#proxy_type)
* [`proxy_server`](#proxy_server)
* [`extensions`](#extensions)
* [`settings`](#settings)
* [`cli_settings`](#cli_settings)
* [`package_prefix`](#package_prefix)
* [`config_root_ini`](#config_root_ini)
* [`config_root_inifile`](#config_root_inifile)
* [`ext_tool_enable`](#ext_tool_enable)
* [`ext_tool_query`](#ext_tool_query)
* [`ext_tool_enabled`](#ext_tool_enabled)
* [`log_owner`](#log_owner)
* [`log_group`](#log_group)
* [`pool_purge`](#pool_purge)
* [`reload_fpm_on_config_changes`](#reload_fpm_on_config_changes)

##### <a name="ensure"></a>`ensure`

Data type: `String`



Default value: `$php::params::ensure`

##### <a name="manage_repos"></a>`manage_repos`

Data type: `Boolean`



Default value: `$php::params::manage_repos`

##### <a name="fpm"></a>`fpm`

Data type: `Boolean`



Default value: ``true``

##### <a name="fpm_service_enable"></a>`fpm_service_enable`

Data type: `Boolean`



Default value: `$php::params::fpm_service_enable`

##### <a name="fpm_service_ensure"></a>`fpm_service_ensure`

Data type: `Enum['running', 'stopped']`



Default value: `$php::params::fpm_service_ensure`

##### <a name="fpm_service_name"></a>`fpm_service_name`

Data type: `String[1]`



Default value: `$php::params::fpm_service_name`

##### <a name="fpm_service_provider"></a>`fpm_service_provider`

Data type: `Optional[String[1]]`



Default value: ``undef``

##### <a name="fpm_pools"></a>`fpm_pools`

Data type: `Hash`



Default value: `$php::params::fpm_pools`

##### <a name="fpm_global_pool_settings"></a>`fpm_global_pool_settings`

Data type: `Hash`



Default value: `{}`

##### <a name="fpm_inifile"></a>`fpm_inifile`

Data type: `Stdlib::Absolutepath`



Default value: `$php::params::fpm_inifile`

##### <a name="fpm_package"></a>`fpm_package`

Data type: `Optional[String[1]]`



Default value: ``undef``

##### <a name="fpm_user"></a>`fpm_user`

Data type: `String[1]`



Default value: `$php::params::fpm_user`

##### <a name="fpm_group"></a>`fpm_group`

Data type: `String[1]`



Default value: `$php::params::fpm_group`

##### <a name="embedded"></a>`embedded`

Data type: `Boolean`



Default value: ``false``

##### <a name="dev"></a>`dev`

Data type: `Boolean`



Default value: ``true``

##### <a name="composer"></a>`composer`

Data type: `Boolean`



Default value: ``true``

##### <a name="pear"></a>`pear`

Data type: `Boolean`



Default value: ``true``

##### <a name="pear_ensure"></a>`pear_ensure`

Data type: `String`



Default value: `$php::params::pear_ensure`

##### <a name="phpunit"></a>`phpunit`

Data type: `Boolean`



Default value: ``false``

##### <a name="apache_config"></a>`apache_config`

Data type: `Boolean`



Default value: ``false``

##### <a name="proxy_type"></a>`proxy_type`

Data type: `Optional[String[1]]`



Default value: ``undef``

##### <a name="proxy_server"></a>`proxy_server`

Data type: `Optional[String[1]]`



Default value: ``undef``

##### <a name="extensions"></a>`extensions`

Data type: `Hash`



Default value: `{}`

##### <a name="settings"></a>`settings`

Data type: `Hash`



Default value: `{}`

##### <a name="cli_settings"></a>`cli_settings`

Data type: `Hash`



Default value: `{}`

##### <a name="package_prefix"></a>`package_prefix`

Data type: `Optional[String[1]]`



Default value: `$php::params::package_prefix`

##### <a name="config_root_ini"></a>`config_root_ini`

Data type: `Stdlib::Absolutepath`



Default value: `$php::params::config_root_ini`

##### <a name="config_root_inifile"></a>`config_root_inifile`

Data type: `Stdlib::Absolutepath`



Default value: `$php::params::config_root_inifile`

##### <a name="ext_tool_enable"></a>`ext_tool_enable`

Data type: `Optional[Stdlib::Absolutepath]`



Default value: `$php::params::ext_tool_enable`

##### <a name="ext_tool_query"></a>`ext_tool_query`

Data type: `Optional[Stdlib::Absolutepath]`



Default value: `$php::params::ext_tool_query`

##### <a name="ext_tool_enabled"></a>`ext_tool_enabled`

Data type: `Boolean`



Default value: `$php::params::ext_tool_enabled`

##### <a name="log_owner"></a>`log_owner`

Data type: `String`



Default value: `$php::params::fpm_user`

##### <a name="log_group"></a>`log_group`

Data type: `String`



Default value: `$php::params::fpm_group`

##### <a name="pool_purge"></a>`pool_purge`

Data type: `Boolean`



Default value: `$php::params::pool_purge`

##### <a name="reload_fpm_on_config_changes"></a>`reload_fpm_on_config_changes`

Data type: `Boolean`



Default value: ``true``

### <a name="phpapache_config"></a>`php::apache_config`

Install and configure php apache settings

=== Parameters

[*inifile*]
  The path to the ini php-apache ini file

[*settings*]
  Hash with nested hash of key => value to set in inifile

#### Parameters

The following parameters are available in the `php::apache_config` class:

* [`inifile`](#inifile)
* [`settings`](#settings)

##### <a name="inifile"></a>`inifile`

Data type: `Stdlib::Absolutepath`



Default value: `$php::params::apache_inifile`

##### <a name="settings"></a>`settings`

Data type: `Hash`



Default value: `{}`

### <a name="phpcli"></a>`php::cli`

Install and configure php CLI

=== Parameters

[*inifile*]
  The path to the ini php5-cli ini file

[*settings*]
  Hash with nested hash of key => value to set in inifile

#### Parameters

The following parameters are available in the `php::cli` class:

* [`inifile`](#inifile)
* [`settings`](#settings)

##### <a name="inifile"></a>`inifile`

Data type: `Stdlib::Absolutepath`



Default value: `$php::params::cli_inifile`

##### <a name="settings"></a>`settings`

Data type: `Hash`



Default value: `{}`

### <a name="phpcomposer"></a>`php::composer`

Install composer package manager

=== Parameters

[*source*]
  Holds URL to the Composer source file

[*path*]
  Holds path to the Composer executable

[*channel*]
  Holds the Update channel (stable|preview|snapshot|1|2)

[*proxy_type*]
   proxy server type (none|http|https|ftp)

[*proxy_server*]
  specify a proxy server, with port number if needed. ie: https://example.com:8080.

[*auto_update*]
  Defines if composer should be auto updated

[*max_age*]
  Defines the time in days after which an auto-update gets executed

[*root_group*]
  UNIX group of the root user

#### Parameters

The following parameters are available in the `php::composer` class:

* [`source`](#source)
* [`path`](#path)
* [`proxy_type`](#proxy_type)
* [`proxy_server`](#proxy_server)
* [`channel`](#channel)
* [`auto_update`](#auto_update)
* [`max_age`](#max_age)
* [`root_group`](#root_group)

##### <a name="source"></a>`source`

Data type: `String`



Default value: `$php::params::composer_source`

##### <a name="path"></a>`path`

Data type: `Stdlib::Absolutepath`



Default value: `$php::params::composer_path`

##### <a name="proxy_type"></a>`proxy_type`

Data type: `Optional[String[1]]`



Default value: ``undef``

##### <a name="proxy_server"></a>`proxy_server`

Data type: `Optional[String[1]]`



Default value: ``undef``

##### <a name="channel"></a>`channel`

Data type: `Php::ComposerChannel`



Default value: `'stable'`

##### <a name="auto_update"></a>`auto_update`

Data type: `Boolean`



Default value: ``true``

##### <a name="max_age"></a>`max_age`

Data type: `Integer`



Default value: `$php::params::composer_max_age`

##### <a name="root_group"></a>`root_group`

Data type: `Variant[Integer, String]`



Default value: `$php::params::root_group`

### <a name="phpcomposerauto_update"></a>`php::composer::auto_update`

Install composer package manager

=== Parameters

[*max_age*]
  Defines number of days after which Composer should be updated

[*source*]
  Holds URL to the Composer source file

[*path*]
  Holds path to the Composer executable

[*channel*]
  Holds the Update channel (stable|preview|snapshot|1|2)

[*proxy_type*]
   proxy server type (none|http|https|ftp)

[*proxy_server*]
  specify a proxy server, with port number if needed. ie: https://example.com:8080.


=== Examples

 include php::composer::auto_update
 class { "php::composer::auto_update":
   "max_age" => 90
 }

#### Parameters

The following parameters are available in the `php::composer::auto_update` class:

* [`max_age`](#max_age)
* [`source`](#source)
* [`path`](#path)
* [`channel`](#channel)
* [`proxy_type`](#proxy_type)
* [`proxy_server`](#proxy_server)

##### <a name="max_age"></a>`max_age`

Data type: `Integer[1]`



##### <a name="source"></a>`source`

Data type: `String[1]`



##### <a name="path"></a>`path`

Data type: `Stdlib::Absolutepath`



##### <a name="channel"></a>`channel`

Data type: `Php::ComposerChannel`



Default value: `'stable'`

##### <a name="proxy_type"></a>`proxy_type`

Data type: `Optional[String[1]]`



Default value: ``undef``

##### <a name="proxy_server"></a>`proxy_server`

Data type: `Optional[String[1]]`



Default value: ``undef``

### <a name="phpdev"></a>`php::dev`

Install the development package with headers for PHP

=== Parameters

[*ensure*]
  The PHP ensure of PHP dev to install

[*package*]
  The package name for the PHP development files

#### Parameters

The following parameters are available in the `php::dev` class:

* [`ensure`](#ensure)
* [`package`](#package)
* [`manage_repos`](#manage_repos)

##### <a name="ensure"></a>`ensure`

Data type: `String`



Default value: `$php::ensure`

##### <a name="package"></a>`package`

Data type: `String`



Default value: `"${php::package_prefix}${php::params::dev_package_suffix}"`

##### <a name="manage_repos"></a>`manage_repos`

Data type: `Boolean`



Default value: `$php::manage_repos`

### <a name="phpembedded"></a>`php::embedded`

Install and configure php embedded SAPI

=== Parameters

[*inifile*]
  The path to the ini php5-embeded ini file

[*settings*]
  Hash with nested hash of key => value to set in inifile

[*package*]
  Specify which package to install

[*ensure*]
  Specify which version of the package to install

#### Parameters

The following parameters are available in the `php::embedded` class:

* [`ensure`](#ensure)
* [`package`](#package)
* [`inifile`](#inifile)
* [`settings`](#settings)

##### <a name="ensure"></a>`ensure`

Data type: `String`



Default value: `$php::ensure`

##### <a name="package"></a>`package`

Data type: `String`



Default value: `"${php::package_prefix}${php::params::embedded_package_suffix}"`

##### <a name="inifile"></a>`inifile`

Data type: `Stdlib::Absolutepath`



Default value: `$php::params::embedded_inifile`

##### <a name="settings"></a>`settings`

Data type: `Hash`



Default value: `{}`

### <a name="phpfpm"></a>`php::fpm`

Install and configure mod_php for fpm

=== Parameters

[*user*]
  The user that php-fpm should run as

[*group*]
  The group that php-fpm should run as

[*service_enable*]
  Enable/disable FPM service

[*service_ensure*]
  Ensure FPM service is either 'running' or 'stopped'

[*service_name*]
  This is the name of the php-fpm service. It defaults to reasonable OS
  defaults but can be different in case of using php7.0/other OS/custom fpm service

[*service_provider*]
  This is the name of the service provider, in case there is a non
  OS default service provider used to start FPM.
  Defaults to 'undef', pick system defaults.

[*pools*]
  Hash of php::fpm::pool resources that will be created. Defaults
  to a single php::fpm::pool named www with default parameters.

[*log_owner*]
  The php-fpm log owner

[*log_group*]
  The group owning php-fpm logs

[*package*]
  Specify which package to install

[*ensure*]
  Specify which version of the package to install

[*inifile*]
  Path to php.ini for fpm

[*settings*]
  fpm settings hash

[*global_pool_settings*]
  Hash of defaults params php::fpm::pool resources that will be created.
  Defaults is empty hash.

[*pool_purge*]
  Whether to purge pool config files not created
  by this module

[*reload_fpm_on_config_changes*]
  by default, we reload the service on changes.
  But certain options, like socket owner, will only be applied during a restart.
  If set to false, a restart will be executed instead of a reload.
  This default will be changed in a future release.

#### Parameters

The following parameters are available in the `php::fpm` class:

* [`ensure`](#ensure)
* [`user`](#user)
* [`group`](#group)
* [`service_ensure`](#service_ensure)
* [`service_enable`](#service_enable)
* [`service_name`](#service_name)
* [`service_provider`](#service_provider)
* [`package`](#package)
* [`inifile`](#inifile)
* [`settings`](#settings)
* [`global_pool_settings`](#global_pool_settings)
* [`pools`](#pools)
* [`log_owner`](#log_owner)
* [`log_group`](#log_group)
* [`pool_purge`](#pool_purge)
* [`reload_fpm_on_config_changes`](#reload_fpm_on_config_changes)

##### <a name="ensure"></a>`ensure`

Data type: `Optional[String]`



Default value: `$php::ensure`

##### <a name="user"></a>`user`

Data type: `String[1]`



Default value: `$php::fpm_user`

##### <a name="group"></a>`group`

Data type: `String[1]`



Default value: `$php::fpm_group`

##### <a name="service_ensure"></a>`service_ensure`

Data type: `Enum['running', 'stopped']`



Default value: `$php::fpm_service_ensure`

##### <a name="service_enable"></a>`service_enable`

Data type: `Boolean`



Default value: `$php::fpm_service_enable`

##### <a name="service_name"></a>`service_name`

Data type: `String[1]`



Default value: `$php::fpm_service_name`

##### <a name="service_provider"></a>`service_provider`

Data type: `Optional[String[1]]`



Default value: `$php::fpm_service_provider`

##### <a name="package"></a>`package`

Data type: `String`



Default value: `$php::real_fpm_package`

##### <a name="inifile"></a>`inifile`

Data type: `Stdlib::Absolutepath`



Default value: `$php::fpm_inifile`

##### <a name="settings"></a>`settings`

Data type: `Hash`



Default value: `$php::real_settings`

##### <a name="global_pool_settings"></a>`global_pool_settings`

Data type: `Hash`



Default value: `$php::real_fpm_global_pool_settings`

##### <a name="pools"></a>`pools`

Data type: `Hash`



Default value: `$php::real_fpm_pools`

##### <a name="log_owner"></a>`log_owner`

Data type: `String[1]`



Default value: `$php::log_owner`

##### <a name="log_group"></a>`log_group`

Data type: `String[1]`



Default value: `$php::log_group`

##### <a name="pool_purge"></a>`pool_purge`

Data type: `Boolean`



Default value: `$php::pool_purge`

##### <a name="reload_fpm_on_config_changes"></a>`reload_fpm_on_config_changes`

Data type: `Boolean`



Default value: `$php::reload_fpm_on_config_changes`

### <a name="phpfpmconfig"></a>`php::fpm::config`

Configure php-fpm service

=== Parameters

[*config_file*]
  The path to the fpm config file

[*user*]
  The user that runs php-fpm

[*group*]
  The group that runs php-fpm

[*inifile*]
  The path to ini file

[*settings*]
  Nested hash of key => value to apply to php.ini

[*pool_base_dir*]
  The folder that contains the php-fpm pool configs

[*pool_purge*]
  Whether to purge pool config files not created
  by this module

[*error_log*]
  Path to error log file. If it's set to "syslog", log is
  sent to syslogd instead of being written in a local file.

[*log_level*]
  The php-fpm log level

[*emergency_restart_threshold*]
  The php-fpm emergency_restart_threshold

[*emergency_restart_interval*]
  The php-fpm emergency_restart_interval

[*process_control_timeout*]
  The php-fpm process_control_timeout

[*process_max*]
  The maximum number of processes FPM will fork.

[*rlimit_files*]
  Set open file descriptor rlimit for the master process.

[*systemd_interval*]
  The interval between health report notification to systemd

[*log_owner*]
  The php-fpm log owner

[*log_group*]
  The group owning php-fpm logs

[*log_dir_mode*]
  The octal mode of the directory

[*syslog_facility*]
  Used to specify what type of program is logging the message

[*syslog_ident*]
  Prepended to every message

[*root_group*]
  UNIX group of the root user

[*pid_file*]
  Path to fpm pid file

#### Parameters

The following parameters are available in the `php::fpm::config` class:

* [`config_file`](#config_file)
* [`user`](#user)
* [`group`](#group)
* [`inifile`](#inifile)
* [`pid_file`](#pid_file)
* [`settings`](#settings)
* [`pool_base_dir`](#pool_base_dir)
* [`pool_purge`](#pool_purge)
* [`error_log`](#error_log)
* [`log_level`](#log_level)
* [`emergency_restart_threshold`](#emergency_restart_threshold)
* [`emergency_restart_interval`](#emergency_restart_interval)
* [`process_control_timeout`](#process_control_timeout)
* [`process_max`](#process_max)
* [`rlimit_files`](#rlimit_files)
* [`systemd_interval`](#systemd_interval)
* [`log_owner`](#log_owner)
* [`log_group`](#log_group)
* [`log_dir_mode`](#log_dir_mode)
* [`root_group`](#root_group)
* [`syslog_facility`](#syslog_facility)
* [`syslog_ident`](#syslog_ident)

##### <a name="config_file"></a>`config_file`

Data type: `Stdlib::Absolutepath`



Default value: `$php::params::fpm_config_file`

##### <a name="user"></a>`user`

Data type: `String`



Default value: `$php::params::fpm_user`

##### <a name="group"></a>`group`

Data type: `String`



Default value: `$php::params::fpm_group`

##### <a name="inifile"></a>`inifile`

Data type: `String`



Default value: `$php::params::fpm_inifile`

##### <a name="pid_file"></a>`pid_file`

Data type: `Stdlib::Absolutepath`



Default value: `$php::params::fpm_pid_file`

##### <a name="settings"></a>`settings`

Data type: `Hash`



Default value: `{}`

##### <a name="pool_base_dir"></a>`pool_base_dir`

Data type: `Stdlib::Absolutepath`



Default value: `$php::params::fpm_pool_dir`

##### <a name="pool_purge"></a>`pool_purge`

Data type: `Boolean`



Default value: ``false``

##### <a name="error_log"></a>`error_log`

Data type: `String`



Default value: `$php::params::fpm_error_log`

##### <a name="log_level"></a>`log_level`

Data type: `String`



Default value: `'notice'`

##### <a name="emergency_restart_threshold"></a>`emergency_restart_threshold`

Data type: `Integer`



Default value: `0`

##### <a name="emergency_restart_interval"></a>`emergency_restart_interval`

Data type: `Php::Duration`



Default value: `0`

##### <a name="process_control_timeout"></a>`process_control_timeout`

Data type: `Php::Duration`



Default value: `0`

##### <a name="process_max"></a>`process_max`

Data type: `Integer`



Default value: `0`

##### <a name="rlimit_files"></a>`rlimit_files`

Data type: `Optional[Integer[1]]`



Default value: ``undef``

##### <a name="systemd_interval"></a>`systemd_interval`

Data type: `Optional[Php::Duration]`



Default value: ``undef``

##### <a name="log_owner"></a>`log_owner`

Data type: `String`



Default value: `$php::params::fpm_user`

##### <a name="log_group"></a>`log_group`

Data type: `String`



Default value: `$php::params::fpm_group`

##### <a name="log_dir_mode"></a>`log_dir_mode`

Data type: `Pattern[/^\d+$/]`



Default value: `'0770'`

##### <a name="root_group"></a>`root_group`

Data type: `String[1]`



Default value: `$php::params::root_group`

##### <a name="syslog_facility"></a>`syslog_facility`

Data type: `String`



Default value: `'daemon'`

##### <a name="syslog_ident"></a>`syslog_ident`

Data type: `String`



Default value: `'php-fpm'`

### <a name="phpfpmservice"></a>`php::fpm::service`

Manage fpm service

=== Parameters

[*service_name*]
  name of the php-fpm service

[*ensure*]
  'ensure' value for the service

[*enable*]
  Defines if the service is enabled

[*provider*]
  Defines if the service provider to use

[*reload_fpm_on_config_changes*]
  by default, we reload the service on changes.
  But certain options, like socket owner, will only be applied during a restart.
  If set to false, a restart will be executed instead of a reload.
  This default will be changed in a future release.

#### Parameters

The following parameters are available in the `php::fpm::service` class:

* [`service_name`](#service_name)
* [`ensure`](#ensure)
* [`enable`](#enable)
* [`provider`](#provider)
* [`reload_fpm_on_config_changes`](#reload_fpm_on_config_changes)

##### <a name="service_name"></a>`service_name`

Data type: `String[1]`



Default value: `$php::fpm::service_name`

##### <a name="ensure"></a>`ensure`

Data type: `Enum['running', 'stopped']`



Default value: `$php::fpm::service_ensure`

##### <a name="enable"></a>`enable`

Data type: `Boolean`



Default value: `$php::fpm::service_enable`

##### <a name="provider"></a>`provider`

Data type: `Optional[String[1]]`



Default value: `$php::fpm::service_provider`

##### <a name="reload_fpm_on_config_changes"></a>`reload_fpm_on_config_changes`

Data type: `Boolean`



Default value: `$php::fpm::reload_fpm_on_config_changes`

### <a name="phpglobal"></a>`php::global`

The php::global class.

#### Parameters

The following parameters are available in the `php::global` class:

* [`inifile`](#inifile)
* [`settings`](#settings)

##### <a name="inifile"></a>`inifile`

Data type: `Stdlib::Absolutepath`



Default value: `$php::config_root_inifile`

##### <a name="settings"></a>`settings`

Data type: `Hash`



Default value: `{}`

### <a name="phpglobals"></a>`php::globals`

The php::globals class.

#### Parameters

The following parameters are available in the `php::globals` class:

* [`php_version`](#php_version)
* [`config_root`](#config_root)
* [`fpm_pid_file`](#fpm_pid_file)
* [`rhscl_mode`](#rhscl_mode)

##### <a name="php_version"></a>`php_version`

Data type: `Optional[Pattern[/^(rh-)?(php)?[578](\.)?[0-9]/]]`



Default value: ``undef``

##### <a name="config_root"></a>`config_root`

Data type: `Optional[Stdlib::Absolutepath]`



Default value: ``undef``

##### <a name="fpm_pid_file"></a>`fpm_pid_file`

Data type: `Optional[Stdlib::Absolutepath]`



Default value: ``undef``

##### <a name="rhscl_mode"></a>`rhscl_mode`

Data type: `Optional[Enum['rhscl', 'remi']]`



Default value: ``undef``

### <a name="phppackages"></a>`php::packages`

Install common PHP packages

=== Parameters

[*ensure*]
  Specify which version of PHP packages to install

[*names*]
  List of the names of the package to install

[*names_to_prefix*]
  List of packages names that should be prefixed with the common
  package prefix `$php::package_prefix`

#### Parameters

The following parameters are available in the `php::packages` class:

* [`ensure`](#ensure)
* [`manage_repos`](#manage_repos)
* [`names_to_prefix`](#names_to_prefix)
* [`names`](#names)

##### <a name="ensure"></a>`ensure`

Data type: `String`



Default value: `$php::ensure`

##### <a name="manage_repos"></a>`manage_repos`

Data type: `Boolean`



Default value: `$php::manage_repos`

##### <a name="names_to_prefix"></a>`names_to_prefix`

Data type: `Array`



Default value: `prefix($php::params::common_package_suffixes, $php::package_prefix)`

##### <a name="names"></a>`names`

Data type: `Array`



Default value: `$php::params::common_package_names`

### <a name="phpparams"></a>`php::params`

PHP params class

### <a name="phppear"></a>`php::pear`

Install PEAR package manager

=== Parameters

[*ensure*]
  The package ensure of PHP pear to install and run pear auto_discover

[*package*]
  The package name for PHP pear

#### Parameters

The following parameters are available in the `php::pear` class:

* [`ensure`](#ensure)
* [`package`](#package)
* [`manage_repos`](#manage_repos)

##### <a name="ensure"></a>`ensure`

Data type: `String`



Default value: `$php::pear_ensure`

##### <a name="package"></a>`package`

Data type: `Optional[String]`



Default value: ``undef``

##### <a name="manage_repos"></a>`manage_repos`

Data type: `Boolean`



Default value: `$php::manage_repos`

### <a name="phpphpunit"></a>`php::phpunit`

Install phpunit, PHP testing framework

=== Parameters

[*source*]
  Holds URL to the phpunit source file

[*path*]
  Holds path to the phpunit executable

[*auto_update*]
  Defines if phpunit should be auto updated

[*max_age*]
  Defines the time in days after which an auto-update gets executed

#### Parameters

The following parameters are available in the `php::phpunit` class:

* [`source`](#source)
* [`path`](#path)
* [`root_group`](#root_group)
* [`auto_update`](#auto_update)
* [`max_age`](#max_age)

##### <a name="source"></a>`source`

Data type: `String`



Default value: `$php::params::phpunit_source`

##### <a name="path"></a>`path`

Data type: `Stdlib::Absolutepath`



Default value: `$php::params::phpunit_path`

##### <a name="root_group"></a>`root_group`

Data type: `String[1]`



Default value: `$php::params::root_group`

##### <a name="auto_update"></a>`auto_update`

Data type: `Boolean`



Default value: ``true``

##### <a name="max_age"></a>`max_age`

Data type: `Integer`



Default value: `$php::params::phpunit_max_age`

### <a name="phpphpunitauto_update"></a>`php::phpunit::auto_update`

Install phpunit package manager

=== Parameters

[*max_age*]
  Defines number of days after which phpunit should be updated

[*source*]
  Holds URL to the phpunit source file

[*path*]
  Holds path to the phpunit executable

#### Parameters

The following parameters are available in the `php::phpunit::auto_update` class:

* [`max_age`](#max_age)
* [`source`](#source)
* [`path`](#path)

##### <a name="max_age"></a>`max_age`

Data type: `Integer[1]`



##### <a name="source"></a>`source`

Data type: `String[1]`



##### <a name="path"></a>`path`

Data type: `Stdlib::Absolutepath`



### <a name="phprepo"></a>`php::repo`

Configure package repository

### <a name="phprepodebian"></a>`php::repo::debian`

Configure debian apt repo

=== Parameters

[*location*]
  Location of the apt repository

[*release*]
  Release of the apt repository

[*repos*]
  Apt repository names

[*include_src*]
  Add source source repository

[*key*]
  Public key in apt::key format

[*dotdeb*]
  Enable special dotdeb handling

[*sury*]
  Enable special sury handling

#### Parameters

The following parameters are available in the `php::repo::debian` class:

* [`location`](#location)
* [`release`](#release)
* [`repos`](#repos)
* [`include_src`](#include_src)
* [`key`](#key)
* [`dotdeb`](#dotdeb)
* [`sury`](#sury)

##### <a name="location"></a>`location`

Data type: `String[1]`



Default value: `'https://packages.dotdeb.org'`

##### <a name="release"></a>`release`

Data type: `String[1]`



Default value: `'wheezy-php56'`

##### <a name="repos"></a>`repos`

Data type: `String[1]`



Default value: `'all'`

##### <a name="include_src"></a>`include_src`

Data type: `Boolean`



Default value: ``false``

##### <a name="key"></a>`key`

Data type: `Hash`



Default value: `{
    'id'     => '6572BBEF1B5FF28B28B706837E3F070089DF5277',
    'source' => 'http://www.dotdeb.org/dotdeb.gpg',
  }`

##### <a name="dotdeb"></a>`dotdeb`

Data type: `Boolean`



Default value: ``true``

##### <a name="sury"></a>`sury`

Data type: `Boolean`



Default value: ``true``

### <a name="phpreporedhat"></a>`php::repo::redhat`

The php::repo::redhat class.

#### Parameters

The following parameters are available in the `php::repo::redhat` class:

* [`yum_repo`](#yum_repo)

##### <a name="yum_repo"></a>`yum_repo`

Data type: `String[1]`



Default value: `'remi_php56'`

### <a name="phpreposuse"></a>`php::repo::suse`

Configure suse repo

=== Parameters

[*reponame*]
  Name of the Zypper repository

[*baseurl*]
  Base URL of the Zypper repository

#### Parameters

The following parameters are available in the `php::repo::suse` class:

* [`reponame`](#reponame)
* [`baseurl`](#baseurl)

##### <a name="reponame"></a>`reponame`

Data type: `String[1]`



Default value: `'mayflower-php56'`

##### <a name="baseurl"></a>`baseurl`

Data type: `String[1]`



Default value: `'http://download.opensuse.org/repositories/home:/mayflower:/php5.6_based/SLE_11_SP3/'`

### <a name="phprepoubuntu"></a>`php::repo::ubuntu`

Configure ubuntu ppa

=== Parameters

[*version*]
  PHP version to manage (e.g. 5.6)

#### Parameters

The following parameters are available in the `php::repo::ubuntu` class:

* [`version`](#version)

##### <a name="version"></a>`version`

Data type: `Pattern[/^\d\.\d/]`



Default value: `'5.6'`

## Defined types

### <a name="phpapache_vhost"></a>`php::apache_vhost`

Configures an apache vhost for php

=== Parameters

[*vhost*]
  The vhost address

[*docroot*]
  The vhost docroot

[*port*]
  The vhost port

[*default_vhost*]
  defines if vhost is the default vhost

[*fastcgi_socket*]
  address of the fastcgi socket

#### Parameters

The following parameters are available in the `php::apache_vhost` defined type:

* [`vhost`](#vhost)
* [`docroot`](#docroot)
* [`port`](#port)
* [`default_vhost`](#default_vhost)
* [`fastcgi_socket`](#fastcgi_socket)

##### <a name="vhost"></a>`vhost`

Data type: `String[1]`



Default value: `'example.com'`

##### <a name="docroot"></a>`docroot`

Data type: `Stdlib::Absolutepath`



Default value: `'/var/www'`

##### <a name="port"></a>`port`

Data type: `Integer[1]`



Default value: `80`

##### <a name="default_vhost"></a>`default_vhost`

Data type: `Boolean`



Default value: ``true``

##### <a name="fastcgi_socket"></a>`fastcgi_socket`

Data type: `String[1]`



Default value: `'fcgi://127.0.0.1:9000/$1'`

### <a name="phpconfig"></a>`php::config`

Configure php.ini settings for a PHP SAPI

=== Parameters

[*file*]
  The path to ini file

[*config*]
  Nested hash of key => value to apply to php.ini

=== Examples

  php::config { '$unique-name':
    file  => '$full_path_to_ini_file'
    config => {
      {'Date/date.timezone' => 'Europe/Berlin'}
    }
  }

#### Parameters

The following parameters are available in the `php::config` defined type:

* [`file`](#file)
* [`config`](#config)

##### <a name="file"></a>`file`

Data type: `Stdlib::Absolutepath`



##### <a name="config"></a>`config`

Data type: `Hash`



### <a name="phpconfigsetting"></a>`php::config::setting`

Configure php.ini settings

=== Parameters

[*key*]
  The key of the value, like `ini_setting`

[*file*]
  The path to ini file

[*value*]
  The value to set

=== Examples

  php::config::setting { 'Date/date.timezone':
    file  => '$full_path_to_ini_file'
    value => 'Europe/Berlin'
  }

#### Parameters

The following parameters are available in the `php::config::setting` defined type:

* [`key`](#key)
* [`value`](#value)
* [`file`](#file)

##### <a name="key"></a>`key`

Data type: `String[1]`



##### <a name="value"></a>`value`

Data type: `Variant[Integer, String]`



##### <a name="file"></a>`file`

Data type: `Stdlib::Absolutepath`



### <a name="phpextension"></a>`php::extension`

Install a PHP extension package

=== Parameters

[*ensure*]
  The ensure of the package to install
  Could be "present", "absent", "latest", "installed" or a pinned version

[*package_prefix*]
  Prefix to prepend to the package name for the package provider

[*package_name*]
  Full package name for the package provider (e.g. php7.2-xml for
  simlexml extension)

[*provider*]
  The provider used to install the package
  Could be "pecl", "apt", "dpkg" or any other OS package provider
  If set to "none", no package will be installed

[*source*]
  The source to install the extension from. Possible values
  depend on the *provider* used

[*so_name*]
  The DSO name of the package (e.g. opcache for zendopcache)

[*ini_prefix*]
  An optional filename prefix for the settings file of the extension

[*php_api_version*]
  This parameter is used to build the full path to the extension
  directory for zend_extension in PHP < 5.5 (e.g. 20100525)

[*header_packages*]
  System packages dependencies to install for extensions (e.g. for
  memcached libmemcached-dev on Debian)

[*compiler_packages*]
  System packages dependencies to install for compiling extensions
  (e.g. build-essential on Debian)

[*zend*]
 Boolean parameter, whether to load extension as zend_extension.
 Defaults to false.

[*settings*]
  Hash of parameters for the specific extension, which will be written to the extensions config file by
  php::extension::config or a hash of mutliple settings files, each with parameters
  (multifile_settings must be true)
  (f.ex. {p => '..'} or {'bz2' => {..}, {'math' => {...}})

[*multifile_settings*]
  Set this to true if you specify multiple setting files in *settings*. This must be used when the PHP package
  distribution bundles extensions in a single package (like 'common' bundles extensions 'bz2', ...) and each of
  the extension comes with a separate settings file.

[*settings_prefix*]
  Boolean/String parameter, whether to prefix all setting keys with
  the extension name or specified name. Defaults to false.

[*sapi*]
  String parameter, whether to specify ALL sapi or a specific sapi.
  Defaults to ALL.

[*responsefile*]
  File containing answers for interactive extension setup. Supported
  *providers*: pear, pecl.

[*install_options*]
  Array of String or Hash options to pass to the provider.

#### Parameters

The following parameters are available in the `php::extension` defined type:

* [`ensure`](#ensure)
* [`provider`](#provider)
* [`source`](#source)
* [`so_name`](#so_name)
* [`ini_prefix`](#ini_prefix)
* [`php_api_version`](#php_api_version)
* [`package_prefix`](#package_prefix)
* [`package_name`](#package_name)
* [`zend`](#zend)
* [`settings`](#settings)
* [`multifile_settings`](#multifile_settings)
* [`sapi`](#sapi)
* [`settings_prefix`](#settings_prefix)
* [`responsefile`](#responsefile)
* [`header_packages`](#header_packages)
* [`compiler_packages`](#compiler_packages)
* [`install_options`](#install_options)

##### <a name="ensure"></a>`ensure`

Data type: `String`



Default value: `$php::ensure`

##### <a name="provider"></a>`provider`

Data type: `Optional[Php::Provider]`



Default value: ``undef``

##### <a name="source"></a>`source`

Data type: `Optional[String]`



Default value: ``undef``

##### <a name="so_name"></a>`so_name`

Data type: `Optional[String]`



Default value: ``undef``

##### <a name="ini_prefix"></a>`ini_prefix`

Data type: `Optional[String]`



Default value: ``undef``

##### <a name="php_api_version"></a>`php_api_version`

Data type: `Optional[String]`



Default value: ``undef``

##### <a name="package_prefix"></a>`package_prefix`

Data type: `String`



Default value: `$php::package_prefix`

##### <a name="package_name"></a>`package_name`

Data type: `Optional[String[1]]`



Default value: ``undef``

##### <a name="zend"></a>`zend`

Data type: `Boolean`



Default value: ``false``

##### <a name="settings"></a>`settings`

Data type: `Variant[Hash, Hash[String, Hash]]`



Default value: `{}`

##### <a name="multifile_settings"></a>`multifile_settings`

Data type: `Boolean`



Default value: ``false``

##### <a name="sapi"></a>`sapi`

Data type: `Php::Sapi`



Default value: `'ALL'`

##### <a name="settings_prefix"></a>`settings_prefix`

Data type: `Variant[Boolean, String]`



Default value: ``false``

##### <a name="responsefile"></a>`responsefile`

Data type: `Optional[Stdlib::AbsolutePath]`



Default value: ``undef``

##### <a name="header_packages"></a>`header_packages`

Data type: `Variant[String, Array[String]]`



Default value: `[]`

##### <a name="compiler_packages"></a>`compiler_packages`

Data type: `Variant[String, Array[String]]`



Default value: `$php::params::compiler_packages`

##### <a name="install_options"></a>`install_options`

Data type: `Php::InstallOptions`



Default value: ``undef``

### <a name="phpextensionconfig"></a>`php::extension::config`

Configure a PHP extension package

=== Parameters

[*ensure*]
  The ensure of the package to install
  Could be "latest", "installed" or a pinned version

[*provider*]
  The provider used to install the package
  Could be "pecl", "apt", "dpkg" or any other OS package provider
  If set to "none", no package will be installed

[*so_name*]
  The DSO name of the package (e.g. opcache for zendopcache)

[*ini_prefix*]
  An optional filename prefix for the settings file of the extension

[*php_api_version*]
  This parameter is used to build the full path to the extension
  directory for zend_extension in PHP < 5.5 (e.g. 20100525)

[*header_packages*]
  System packages dependencies to install for extensions (e.g. for
  memcached libmemcached-dev on Debian)

[*compiler_packages*]
  System packages dependencies to install for compiling extensions
  (e.g. build-essential on Debian)

[*zend*]
 Boolean parameter, whether to load extension as zend_extension.
 Defaults to false.

[*settings*]
  Nested hash of global config parameters for php.ini

[*settings_prefix*]
  Boolean/String parameter, whether to prefix all setting keys with
  the extension name or specified name. Defaults to false.

[*sapi*]
  String parameter, whether to specify ALL sapi or a specific sapi.
  Defaults to ALL.

#### Parameters

The following parameters are available in the `php::extension::config` defined type:

* [`ensure`](#ensure)
* [`provider`](#provider)
* [`so_name`](#so_name)
* [`ini_prefix`](#ini_prefix)
* [`php_api_version`](#php_api_version)
* [`zend`](#zend)
* [`settings`](#settings)
* [`settings_prefix`](#settings_prefix)
* [`sapi`](#sapi)

##### <a name="ensure"></a>`ensure`

Data type: `String`



Default value: `'installed'`

##### <a name="provider"></a>`provider`

Data type: `Optional[Php::Provider]`



Default value: ``undef``

##### <a name="so_name"></a>`so_name`

Data type: `Optional[String]`



Default value: `downcase($name)`

##### <a name="ini_prefix"></a>`ini_prefix`

Data type: `Optional[String]`



Default value: ``undef``

##### <a name="php_api_version"></a>`php_api_version`

Data type: `Optional[String]`



Default value: ``undef``

##### <a name="zend"></a>`zend`

Data type: `Boolean`



Default value: ``false``

##### <a name="settings"></a>`settings`

Data type: `Hash`



Default value: `{}`

##### <a name="settings_prefix"></a>`settings_prefix`

Data type: `Variant[Boolean, String]`



Default value: ``false``

##### <a name="sapi"></a>`sapi`

Data type: `Php::Sapi`



Default value: `'ALL'`

### <a name="phpextensioninstall"></a>`php::extension::install`

Install a PHP extension package

=== Parameters

[*ensure*]
  The ensure of the package to install
  Could be "latest", "installed" or a pinned version

[*package_prefix*]
  Prefix to prepend to the package name for the package provider

[*package_name*]
  Full package name for the package provider (e.g. php7.2-xml for
  simlexml extension)

[*provider*]
  The provider used to install the package
  Could be "pecl", "apt", "dpkg" or any other OS package provider
  If set to "none", no package will be installed

[*source*]
  The source to install the extension from. Possible values
  depend on the *provider* used

[*header_packages*]
  System packages dependencies to install for extensions (e.g. for
  memcached libmemcached-dev on Debian)

[*compiler_packages*]
  System packages dependencies to install for compiling extensions
  (e.g. build-essential on Debian)

[*responsefile*]
  File containing answers for interactive extension setup. Supported
  *providers*: pear, pecl.

[*install_options*]
  Array of String or Hash options to pass to the provider.

#### Parameters

The following parameters are available in the `php::extension::install` defined type:

* [`ensure`](#ensure)
* [`provider`](#provider)
* [`source`](#source)
* [`package_prefix`](#package_prefix)
* [`package_name`](#package_name)
* [`responsefile`](#responsefile)
* [`header_packages`](#header_packages)
* [`compiler_packages`](#compiler_packages)
* [`install_options`](#install_options)

##### <a name="ensure"></a>`ensure`

Data type: `String`



Default value: `'installed'`

##### <a name="provider"></a>`provider`

Data type: `Optional[Php::Provider]`



Default value: ``undef``

##### <a name="source"></a>`source`

Data type: `Optional[String]`



Default value: ``undef``

##### <a name="package_prefix"></a>`package_prefix`

Data type: `String`



Default value: `$php::package_prefix`

##### <a name="package_name"></a>`package_name`

Data type: `Optional[String[1]]`



Default value: ``undef``

##### <a name="responsefile"></a>`responsefile`

Data type: `Optional[Stdlib::AbsolutePath]`



Default value: ``undef``

##### <a name="header_packages"></a>`header_packages`

Data type: `Variant[String, Array[String]]`



Default value: `[]`

##### <a name="compiler_packages"></a>`compiler_packages`

Data type: `Variant[String, Array[String]]`



Default value: `$php::params::compiler_packages`

##### <a name="install_options"></a>`install_options`

Data type: `Php::InstallOptions`



Default value: ``undef``

### <a name="phpfpmpool"></a>`php::fpm::pool`

Configure fpm pools

=== Parameters

See the official php-fpm documentation for parameters that are not
documented here: http://php.net/manual/en/install.fpm.configuration.php.

[*ensure*]
  Remove pool if set to `'absent'`, add otherwise

[*listen*]
  On what socket to listen for FastCGI connections, i.e.
  `'127.0.0.1:9000'' or `'/var/run/php5-fpm.sock'`

[*listen_backlog*]

[*listen_allowed_clients*]

[*listen_owner*]
  Set owner of the Unix socket

[*listen_group*]
  Set the group of the Unix socket

[*listen_mode*]

[*user*]
  The user that php-fpm should run as

[*group*]
  The group that php-fpm should run as

[*apparmor_hat*]
  The Apparmor hat to use

[*pm*]

[*pm_max_children*]

[*pm_start_servers*]

[*pm_min_spare_servers*]

[*pm_max_spare_servers*]

[*pm_max_requests*]

[*pm_process_idle_timeout*]

[*pm_status_path*]

[*ping_path*]

[*ping_response*]

[*access_log*]
  The path to the file to write access log requests to

[*access_log_format*]
  The format to save the access log entries as

[*request_terminate_timeout*]

[*request_slowlog_timeout*]

[*security_limit_extensions*]

[*slowlog*]

[*template*]
  The template to use for the pool

[*rlimit_files*]

[*rlimit_core*]

[*chroot*]

[*chdir*]

[*catch_workers_output*]

[*include*]
  Other configuration files to include on this pool

[*env*]
  List of environment variables that are passed to the php-fpm from the
  outside and will be available to php scripts in this pool

[*env_value*]
  Hash of environment variables and values as strings to use in php
  scripts in this pool

[*clear_env*]
  Whether the environment should be cleared.

[*options*]
  An optional hash for any other data.

[*php_value*]
  Hash of php_value directives

[*php_flag*]
  Hash of php_flag directives

[*php_admin_value*]
  Hash of php_admin_value directives

[*php_admin_flag*]
  Hash of php_admin_flag directives

[*php_directives*]
  List of custom directives that are appended to the pool config

[*root_group*]
  UNIX group of the root user

[*base_dir*]
  The folder that contains the php-fpm pool configs. This defaults to a
  sensible default depending on your operating system, like
  '/etc/php5/fpm/pool.d' or '/etc/php-fpm.d'

#### Parameters

The following parameters are available in the `php::fpm::pool` defined type:

* [`ensure`](#ensure)
* [`listen`](#listen)
* [`listen_backlog`](#listen_backlog)
* [`listen_allowed_clients`](#listen_allowed_clients)
* [`listen_owner`](#listen_owner)
* [`listen_group`](#listen_group)
* [`listen_mode`](#listen_mode)
* [`user`](#user)
* [`group`](#group)
* [`apparmor_hat`](#apparmor_hat)
* [`pm`](#pm)
* [`pm_max_children`](#pm_max_children)
* [`pm_start_servers`](#pm_start_servers)
* [`pm_min_spare_servers`](#pm_min_spare_servers)
* [`pm_max_spare_servers`](#pm_max_spare_servers)
* [`pm_max_requests`](#pm_max_requests)
* [`pm_process_idle_timeout`](#pm_process_idle_timeout)
* [`pm_status_path`](#pm_status_path)
* [`ping_path`](#ping_path)
* [`ping_response`](#ping_response)
* [`access_log`](#access_log)
* [`access_log_format`](#access_log_format)
* [`request_terminate_timeout`](#request_terminate_timeout)
* [`request_slowlog_timeout`](#request_slowlog_timeout)
* [`security_limit_extensions`](#security_limit_extensions)
* [`slowlog`](#slowlog)
* [`template`](#template)
* [`rlimit_files`](#rlimit_files)
* [`rlimit_core`](#rlimit_core)
* [`chroot`](#chroot)
* [`chdir`](#chdir)
* [`catch_workers_output`](#catch_workers_output)
* [`include`](#include)
* [`env`](#env)
* [`env_value`](#env_value)
* [`clear_env`](#clear_env)
* [`options`](#options)
* [`php_value`](#php_value)
* [`php_flag`](#php_flag)
* [`php_admin_value`](#php_admin_value)
* [`php_admin_flag`](#php_admin_flag)
* [`php_directives`](#php_directives)
* [`root_group`](#root_group)
* [`base_dir`](#base_dir)

##### <a name="ensure"></a>`ensure`

Data type: `Enum['present', 'absent']`



Default value: `'present'`

##### <a name="listen"></a>`listen`

Data type: `String[1]`



Default value: `'127.0.0.1:9000'`

##### <a name="listen_backlog"></a>`listen_backlog`

Data type: `Integer[-1]`



Default value: `-`

##### <a name="listen_allowed_clients"></a>`listen_allowed_clients`

Data type: `Optional[String[1]]`



Default value: ``undef``

##### <a name="listen_owner"></a>`listen_owner`

Data type: `Optional[String[1]]`



Default value: ``undef``

##### <a name="listen_group"></a>`listen_group`

Data type: `Optional[String[1]]`



Default value: ``undef``

##### <a name="listen_mode"></a>`listen_mode`

Data type: `Optional[Stdlib::Filemode]`



Default value: ``undef``

##### <a name="user"></a>`user`

Data type: `String[1]`



Default value: `$php::fpm::config::user`

##### <a name="group"></a>`group`

Data type: `String[1]`



Default value: `$php::fpm::config::group`

##### <a name="apparmor_hat"></a>`apparmor_hat`

Data type: `Optional[String[1]]`



Default value: ``undef``

##### <a name="pm"></a>`pm`

Data type: `String[1]`



Default value: `'dynamic'`

##### <a name="pm_max_children"></a>`pm_max_children`

Data type: `Integer[1]`



Default value: `50`

##### <a name="pm_start_servers"></a>`pm_start_servers`

Data type: `Integer[0]`



Default value: `5`

##### <a name="pm_min_spare_servers"></a>`pm_min_spare_servers`

Data type: `Integer[0]`



Default value: `5`

##### <a name="pm_max_spare_servers"></a>`pm_max_spare_servers`

Data type: `Integer[0]`



Default value: `35`

##### <a name="pm_max_requests"></a>`pm_max_requests`

Data type: `Integer[0]`



Default value: `0`

##### <a name="pm_process_idle_timeout"></a>`pm_process_idle_timeout`

Data type: `Php::Duration`



Default value: `'10s'`

##### <a name="pm_status_path"></a>`pm_status_path`

Data type: `Optional[Stdlib::Absolutepath]`



Default value: ``undef``

##### <a name="ping_path"></a>`ping_path`

Data type: `Optional[Stdlib::Absolutepath]`



Default value: ``undef``

##### <a name="ping_response"></a>`ping_response`

Data type: `String[1]`



Default value: `'pong'`

##### <a name="access_log"></a>`access_log`

Data type: `Optional[Stdlib::Absolutepath]`



Default value: ``undef``

##### <a name="access_log_format"></a>`access_log_format`

Data type: `String[1]`



Default value: `'"%R - %u %t \"%m %r\" %s"'`

##### <a name="request_terminate_timeout"></a>`request_terminate_timeout`

Data type: `Php::Duration`



Default value: `0`

##### <a name="request_slowlog_timeout"></a>`request_slowlog_timeout`

Data type: `Php::Duration`



Default value: `0`

##### <a name="security_limit_extensions"></a>`security_limit_extensions`

Data type: `Array[String[1]]`



Default value: `[]`

##### <a name="slowlog"></a>`slowlog`

Data type: `Stdlib::Absolutepath`



Default value: `"/var/log/php-fpm/${name}-slow.log"`

##### <a name="template"></a>`template`

Data type: `String[1]`



Default value: `'php/fpm/pool.conf.erb'`

##### <a name="rlimit_files"></a>`rlimit_files`

Data type: `Optional[Integer]`



Default value: ``undef``

##### <a name="rlimit_core"></a>`rlimit_core`

Data type: `Optional[Integer]`



Default value: ``undef``

##### <a name="chroot"></a>`chroot`

Data type: `Optional[Stdlib::Absolutepath]`



Default value: ``undef``

##### <a name="chdir"></a>`chdir`

Data type: `Optional[Stdlib::Absolutepath]`



Default value: ``undef``

##### <a name="catch_workers_output"></a>`catch_workers_output`

Data type: `Enum['yes', 'no']`



Default value: `'no'`

##### <a name="include"></a>`include`

Data type: `Optional[String[1]]`



Default value: ``undef``

##### <a name="env"></a>`env`

Data type: `Array[String[1]]`



Default value: `[]`

##### <a name="env_value"></a>`env_value`

Data type: `Hash`



Default value: `{}`

##### <a name="clear_env"></a>`clear_env`

Data type: `Boolean`



Default value: ``true``

##### <a name="options"></a>`options`

Data type: `Hash`



Default value: `{}`

##### <a name="php_value"></a>`php_value`

Data type: `Hash`



Default value: `{}`

##### <a name="php_flag"></a>`php_flag`

Data type: `Hash`



Default value: `{}`

##### <a name="php_admin_value"></a>`php_admin_value`

Data type: `Hash`



Default value: `{}`

##### <a name="php_admin_flag"></a>`php_admin_flag`

Data type: `Hash`



Default value: `{}`

##### <a name="php_directives"></a>`php_directives`

Data type: `Array[String[1]]`



Default value: `[]`

##### <a name="root_group"></a>`root_group`

Data type: `String[1]`



Default value: `$php::params::root_group`

##### <a name="base_dir"></a>`base_dir`

Data type: `Optional[Stdlib::Absolutepath]`



Default value: ``undef``

## Functions

### <a name="ensure_prefix"></a>`ensure_prefix`

Type: Ruby 3.x API

This function ensures a prefix for all elements in an array or the keys in a hash.

*Examples:*

  ensure_prefix({'a' => 1, 'b' => 2, 'p.c' => 3}, 'p.')

Will return:
  {
    'p.a' => 1,
    'p.b' => 2,
    'p.c' => 3,
  }

  ensure_prefix(['a', 'p.b', 'c'], 'p.')

Will return:
  ['p.a', 'p.b', 'p.c']

#### `ensure_prefix()`

This function ensures a prefix for all elements in an array or the keys in a hash.

*Examples:*

  ensure_prefix({'a' => 1, 'b' => 2, 'p.c' => 3}, 'p.')

Will return:
  {
    'p.a' => 1,
    'p.b' => 2,
    'p.c' => 3,
  }

  ensure_prefix(['a', 'p.b', 'c'], 'p.')

Will return:
  ['p.a', 'p.b', 'p.c']

Returns: `Any`

### <a name="to_hash_settings"></a>`to_hash_settings`

Type: Ruby 3.x API

This function converts a +{key => value}+ hash into a nested hash and can add an id to the outer key.
The optional id string as second parameter is prepended to the resource name.

*Examples:*

  to_hash_settings({'a' => 1, 'b' => 2})

Would return:
  {
    'a' => {'key' => 'a', 'value' => 1},
    'b' => {'key' => 'b', 'value' => 2}
  }

and:

  to_hash_settings({'a' => 1, 'b' => 2}, 'foo')

Would return:
  {
    'foo: a' => {'key' => 'a', 'value' => 1},
    'foo: b' => {'key' => 'b', 'value' => 2}
  }

#### `to_hash_settings()`

This function converts a +{key => value}+ hash into a nested hash and can add an id to the outer key.
The optional id string as second parameter is prepended to the resource name.

*Examples:*

  to_hash_settings({'a' => 1, 'b' => 2})

Would return:
  {
    'a' => {'key' => 'a', 'value' => 1},
    'b' => {'key' => 'b', 'value' => 2}
  }

and:

  to_hash_settings({'a' => 1, 'b' => 2}, 'foo')

Would return:
  {
    'foo: a' => {'key' => 'a', 'value' => 1},
    'foo: b' => {'key' => 'b', 'value' => 2}
  }

Returns: `Any`

## Data types

### <a name="phpcomposerchannel"></a>`Php::ComposerChannel`

The Php::ComposerChannel data type.

Alias of

```puppet
Enum['stable', 'preview', 'snapshot', '1', '2']
```

### <a name="phpduration"></a>`Php::Duration`

A duration in seconds are with an unit

Alias of

```puppet
Variant[Integer[0], Pattern[/^\d+[smhd]?$/]]
```

### <a name="phpinstalloptions"></a>`Php::InstallOptions`

The Php::InstallOptions data type.

Alias of

```puppet
Optional[Array[
    Variant[
      String,
      Hash[String, String]
    ]
  ]]
```

### <a name="phpprovider"></a>`Php::Provider`

The Php::Provider data type.

Alias of

```puppet
Enum['none', 'pecl', 'pear', 'dpkg', 'apt', 'yum', 'rpm', 'dnf', 'up2date', 'zypper', 'rug', 'freebsd', 'pkgng', 'ports', 'portupgrade']
```

### <a name="phpsapi"></a>`Php::Sapi`

The Php::Sapi data type.

Alias of

```puppet
Enum['ALL', 'cli', 'fpm', 'apache2']
```