Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
- Puppet >= 7.0.0 < 9.0.0
- OpenSUSE , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppet-php', '10.2.0'
Learn more about managing modules with a PuppetfileDocumentation
voxpupuli/php Puppet Module
voxpupuli/php is a Puppet module for managing PHP with a strong focus
on php-fpm. The module aims to use sane defaults for the supported
architectures. We strive to support all recent versions of Debian,
Ubuntu, RedHat/CentOS, openSUSE/SLES and FreeBSD. Managing Apache
with mod_php
is not supported.
This originally was a fork of jippi/puppet-php (nodes-php on Puppet Forge) but has since been rewritten in large parts.
Usage
Quickest way to get started is simply include
'ing the php
class.
include 'php'
Or, you can override defaults and specify additional custom
configurations by declaring class { 'php': }
with parameters:
class { 'php':
ensure => latest,
manage_repos => true,
fpm => true,
dev => true,
composer => true,
pear => true,
phpunit => false,
}
Optionally the PHP version or configuration root directory can be changed also:
class { 'php::globals':
php_version => '7.0',
config_root => '/etc/php/7.0',
}->
class { 'php':
manage_repos => true
}
There are more configuration options available. Please refer to the auto-generated documentation at REFERENCE.md.
Defining php.ini
settings
PHP configuration parameters in php.ini
files can be defined as parameter
settings
on the main php
class, or php::fpm
/ php::cli
classes,
or php::extension
resources for each component independently.
These settings are written into their respective php.ini
file. Global
settings in php::settings
are merged with the settings of all components.
Please note that settings of extensions are always independent.
In the following example the PHP options and timezone will be set in all PHP configurations, i.e. the PHP cli application and all php-fpm pools.
class { 'php':
settings => {
'PHP/max_execution_time' => '90',
'PHP/max_input_time' => '300',
'PHP/memory_limit' => '64M',
'PHP/post_max_size' => '32M',
'PHP/upload_max_filesize' => '32M',
'Date/date.timezone' => 'Europe/Berlin',
},
}
Installing extensions
PHP configuration parameters in php.ini
files can be defined
as parameter extensions
on the main php
class. They are
activated for all activated SAPIs.
class { 'php':
extensions => {
bcmath => { },
imagick => {
provider => pecl,
},
xmlrpc => { },
memcached => {
provider => 'pecl',
header_packages => [ 'libmemcached-devel', ],
},
apc => {
provider => 'pecl',
settings => {
'apc/stat' => '1',
'apc/stat_ctime' => '1',
},
sapi => 'fpm',
},
},
}
See the documentation of the php::extension
resource for all available parameters and default values.
Defining php-fpm pools
If different php-fpm pools are required, you can use php::fpm::pool
defined resource type. A single pool called www
will be configured
by default. Specify additional pools like so:
php::fpm::pool { 'www2':
listen => '127.0.1.1:9000',
}
For an overview of all possible parameters for php::fpm::pool
resources please
see its documentation.
Overriding php-fpm user
By default, php-fpm is set up to run as Apache. If you need to customize that user, you can do that like so:
class { 'php':
fpm_user => 'nginx',
fpm_group => 'nginx',
}
PHP with one FPM pool per user
This will create one vhost. $users is an array of people having php files at $fqdn/$user. This code uses voxpupuli/php and voxpupuli/nginx to create the vhost and one php fpm pool per user. This was tested on Archlinux with nginx 1.13 and PHP 7.2.3.
$users = ['bob', 'alice']
class { 'php':
ensure => 'present',
manage_repos => false,
fpm => true,
dev => false,
composer => false,
pear => true,
phpunit => false,
fpm_pools => {},
}
include nginx
nginx::resource::server{$facts['fqdn']:
www_root => '/var/www',
autoindex => 'on',
}
nginx::resource::location{'dontexportprivatedata':
server => $facts['fqdn'],
location => '~ /\.',
location_deny => ['all'],
}
$users.each |$user| {
# create one fpm pool. will be owned by the specific user
# fpm socket will be owned by the nginx user 'http'
php::fpm::pool{$user:
user => $user,
group => $user,
listen_owner => 'http',
listen_group => 'http',
listen_mode => '0660',
listen => "/var/run/php-fpm/${user}-fpm.sock",
}
nginx::resource::location { "${name}_root":
ensure => 'present',
server => $facts['fqdn'],
location => "~ .*${user}\/.*\.php$",
index_files => ['index.php'],
fastcgi => "unix:/var/run/php-fpm/${user}-fpm.sock",
include => ['fastcgi.conf'],
}
}
Alternative examples using Hiera
Alternative to the Puppet DSL code examples above, you may optionally define your PHP configuration using Hiera.
Below are all the examples you see above, but defined in YAML format for use with Hiera.
---
php::ensure: latest
php::manage_repos: true
php::fpm: true
php::fpm_user: 'nginx'
php::fpm_group: 'nginx'
php::dev: true
php::composer: true
php::pear: true
php::phpunit: false
php::settings:
'PHP/max_execution_time': '90'
'PHP/max_input_time': '300'
'PHP/memory_limit': '64M'
'PHP/post_max_size': '32M'
'PHP/upload_max_filesize': '32M'
'Date/date.timezone': 'Europe/Berlin'
php::extensions:
bcmath: {}
xmlrpc: {}
imagick:
provider: pecl
memcached:
provider: pecl
header_packages:
- libmemcached-dev
apc:
provider: pecl
settings:
'apc/stat': 1
'apc/stat_ctime': 1
sapi: 'fpm'
php::fpm::pools:
www2:
listen: '127.0.1.1:9000'
Notes
Inheriting configuration across multiple Hiera sources
Configuration from Hiera such as php::fpm::pools
is automatically
lookup up using the "first" merge method. This means that the first
value found is used. If you instead want to merge the hash keys
across multiple Hiera sources, you can use lookup_options
to
set hash
or deep
behaviors such as in the example
data/default.yaml:
lookup_options:
php::fpm::pools:
merge: hash
Ubuntu systems and Ondřej's PPA
The older Ubuntu PPAs run by Ondřej have been deprecated (ondrej/php5, ondrej/php5.6) in favor of a new PPA: ondrej/php which contains all 3 versions of PHP: 5.5, 5.6, and 7.0 Here's an example in hiera of getting PHP 5.6 installed with php-fpm, pear/pecl, and composer:
php::globals::php_version: '5.6'
php::fpm: true
php::dev: true
php::composer: true
php::pear: true
php::phpunit: false
If you do not specify a php version, in Ubuntu the default will be 7.0 if you are running Xenial (16.04), otherwise PHP 5.6 will be installed (for other versions)
Apache support
Apache with mod_php
is not supported by this module. Please use
puppetlabs/apache instead.
We prefer using php-fpm. You can find an example Apache vhost in
manifests/apache_vhost.pp
that shows you how to use mod_proxy_fcgi
to
connect to php-fpm.
ZendPHP support
Be sure to require the
zend/zend_common
puppet module to ensure the correct package repository is being used.
To use ZendPHP, configure the global zend parameters.
class { 'php::globals':
php_version => '7.4',
flavor => 'zend',
zend_creds => {
'username' => '<USERNAME>',
'password' => '<PASSWORD>',
},
}->
class { 'php':
fpm => true,
fpm_pools => {
www => {
listen => "127.0.0.1:9000",
},
}
}
ZendPHP soft dependencies on RedHat/CentOS/Rocky
Due to the nature of ZendPHP delivering patched, LTS versions of PHP and its extensions,
RedHat systems sometimes depend on epel
and the powertools
repo.
If you're trying to use ZendPHP and running into issues of missing dependencies,
first try installing epel. If the dependencies still can't be found, try
enabling powertools
.
if $facts['os']['family'] == 'RedHat' {
package { 'epel-release': }
if Float($php_version) < 7.4 {
# Depends on puppet/yum
class { 'yum':
managed_repos => ['powertools'],
repos => {
'powertools' => {
enabled => true,
},
},
}
}
}
RedHat/CentOS SCL Users
If you plan to use the SCL repositories with this module you must do the following adjustments:
General config
This ensures that the module will create configurations in the directory
/etc/opt/rh/<php_version>/
(also in php.d/ for extensions). Anyway you have to
manage the SCL repo's by your own.
class { 'php::globals':
php_version => 'rh-php71',
rhscl_mode => 'rhscl',
}
-> class { 'php':
manage_repos => false
}
Extensions
Extensions in SCL are being installed with packages that cover 1 or more .so files. This is kinda incompatible with this module, since this module specifies an extension by name and derives the name of the package and the config (.ini) from it. To manage extensions of SCL packages you must use the following parameters:
class { 'php':
...
extensions => {
'soap' => {
ini_prefix => '20-',
},
}
}
By this you tell the module to configure bz2 and calender while ensuring only the package common
. Additionally to the
installation of 'common' the ini files 'calender.ini' and 'bz2.ini' will be created by the scheme
<config_file_prefix><extension_title>
.
A list of commonly used modules:
{
extensions => {
'xml' => {
ini_prefix => '20-',
multifile_settings => true,
settings => {
'dom' => {},
'simplexml' => {},
'xmlwriter' => {},
'xsl' => {},
'wddx' => {},
'xmlreader' => {},
},
},
'soap' => {
ini_prefix => '20-',
},
'imap' => {
ini_prefix => '20-',
},
'intl' => {
ini_prefix => '20-',
},
'gd' => {
ini_prefix => '20-',
},
'mbstring' => {
ini_prefix => '20-',
},
'xmlrpc' => {
ini_prefix => '20-',
},
'pdo' => {
ini_prefix => '20-',
multifile_settings => true,
settings => {
'pdo' => {},
'pdo_sqlite' => {},
'sqlite3' => {},
},
},
'process' => {
ini_prefix => '20-',
multifile_settings => true,
settings => {
'posix' => {},
'shmop' => {},
'sysvmsg' => {},
'sysvsem' => {},
'sysvshm' => {},
},
},
'mysqlnd' => {
ini_prefix => '30-',
multifile_settings => true,
settings => {
'mysqlnd' => {},
'mysql' => {},
'mysqli' => {},
'pdo_mysql' => {},
'sysvshm' => {},
},
},
}
}
Facts
We deliver a phpversion
fact with this module. This is explicitly NOT intended
to be used within your puppet manifests as it will only work on your second puppet
run. Its intention is to make querying PHP versions per server easy via PuppetDB or Foreman.
FreeBSD support
On FreeBSD systems we purge the system-wide extensions.ini
in favour of
per-module configuration files.
Please also note that support for Composer and PHPUnit on FreeBSD is untested and thus likely incomplete.
Running the test suite
To run the tests install the ruby dependencies with bundler
and execute
rake
:
bundle install --path vendor/bundle
bundle exec rake
Bugs & New Features
If you happen to stumble upon a bug, please feel free to create a pull request with a fix (optionally with a test), and a description of the bug and how it was resolved.
Or if you're not into coding, simply create an issue adding steps to let us reproduce the bug and we will happily fix it.
If you have a good idea for a feature or how to improve this module in general, please create an issue to discuss it. We are very open to feedback. Pull requests are always welcome.
We hate orphaned and unmaintained Puppet modules as much as you do and therefore promise that we will continue to maintain this module and keep response times to issues short. If we happen to lose interest, we will write a big fat warning into this README to let you know.
License
The project is released under the permissive MIT license.
The source can be found at github.com/voxpupuli/puppet-php.
This Puppet module was originally maintained by some fellow puppeteers at Mayflower GmbH and is now maintained by Vox Pupuli.
Reference
Table of Contents
Classes
php
: Base class with global configuration parameters that pulls in all enabled components. === Parameters [ensure] Specify which version ofphp::apache_config
: Install and configure php apache settings === Parameters [inifile] The path to the ini php-apache ini file [settings] Hash with nephp::cli
: Install and configure php CLI === Parameters [inifile] The path to the ini php5-cli ini file [settings] Hash with nested hash of kphp::composer
: Install composer package manager === Parameters [source] Holds URL to the Composer source file [path] Holds path to the Composer ephp::composer::auto_update
: Install composer package manager === Parameters [max_age] Defines number of days after which Composer should be updated [source] Hphp::dev
: Install the development package with headers for PHP === Parameters [ensure] The PHP ensure of PHP dev to install [package] The paphp::embedded
: Install and configure php embedded SAPI === Parameters [inifile] The path to the ini php5-embeded ini file [settings] Hash with nephp::fpm
: Install and configure mod_php for fpm === Parameters [user] The user that php-fpm should run as [group] The group that php-fpm shophp::fpm::config
: Configure php-fpm service === Parameters [config_file] The path to the fpm config file [user] The user that runs php-fpm [groupphp::fpm::service
: Manage fpm service === Parameters [service_name] name of the php-fpm service [ensure] 'ensure' value for the service [enable]php::global
php::globals
php::packages
: Install common PHP packages === Parameters [ensure] Specify which version of PHP packages to install [names] List of the names ofphp::params
: PHP params classphp::pear
: Install PEAR package manager === Parameters [ensure] The package ensure of PHP pear to install and run pear auto_discover [package]php::phpunit
: Install phpunit, PHP testing framework === Parameters [source] Holds URL to the phpunit source file [path] Holds path to the phpunphp::phpunit::auto_update
: Install phpunit package manager === Parameters [max_age] Defines number of days after which phpunit should be updated [source] Holphp::repo
: Configure package repositoryphp::repo::debian
: Configure debian apt repo === Parameters [location] Location of the apt repository [repos] Apt repository names [include_src]php::repo::redhat
php::repo::suse
: Configure suse repo === Parameters [reponame] Name of the Zypper repository [baseurl] Base URL of the Zypper repositoryphp::repo::ubuntu
: Configure ubuntu ppa === Parameters [version] PHP version to manage (e.g. 5.6)
Defined types
php::apache_vhost
: Configures an apache vhost for php === Parameters [vhost] The vhost address [docroot] The vhost docroot [port] The vhost portphp::config
: Configure php.ini settings for a PHP SAPI === Parameters [file] The path to ini file [config] Nested hash of key => value to applyphp::config::setting
: Configure php.ini settings === Parameters [key] The key of the value, likeini_setting
[file] The path to ini file [value]php::extension
: Install a PHP extension package === Parameters [ensure] The ensure of the package to install Could be "present", "absent", "latest",php::extension::config
: Configure a PHP extension package === Parameters [ensure] The ensure of the package to install Could be "latest", "installed" or a piphp::extension::install
: Install a PHP extension package === Parameters [ensure] The ensure of the package to install Could be "latest", "installed" or a pinnphp::fpm::pool
: Configure fpm pools === Parameters See the official php-fpm documentation for parameters that are not documented here: http://php.net/manua
Functions
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
: 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
Php::Duration
: A duration in seconds are with an unitPhp::InstallOptions
Php::Provider
Php::Sapi
Classes
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
manage_repos
fpm
fpm_service_enable
fpm_service_ensure
fpm_service_name
fpm_service_provider
fpm_pools
fpm_global_pool_settings
fpm_inifile
fpm_package
fpm_user
fpm_group
fpm_log_dir_mode
embedded
dev
composer
pear
pear_ensure
phpunit
apache_config
proxy_type
proxy_server
extensions
settings
cli_settings
package_prefix
config_root_ini
config_root_inifile
ext_tool_enable
ext_tool_query
ext_tool_enabled
log_owner
log_group
pool_purge
reload_fpm_on_config_changes
ensure
Data type: String
Default value: $php::params::ensure
manage_repos
Data type: Boolean
Default value: $php::params::manage_repos
fpm
Data type: Boolean
Default value: true
fpm_service_enable
Data type: Boolean
Default value: $php::params::fpm_service_enable
fpm_service_ensure
Data type: Enum['running', 'stopped']
Default value: $php::params::fpm_service_ensure
fpm_service_name
Data type: String[1]
Default value: $php::params::fpm_service_name
fpm_service_provider
Data type: Optional[String[1]]
Default value: undef
fpm_pools
Data type: Hash
Default value: $php::params::fpm_pools
fpm_global_pool_settings
Data type: Hash
Default value: {}
fpm_inifile
Data type: Stdlib::Absolutepath
Default value: $php::params::fpm_inifile
fpm_package
Data type: Optional[String[1]]
Default value: undef
fpm_user
Data type: String[1]
Default value: $php::params::fpm_user
fpm_group
Data type: String[1]
Default value: $php::params::fpm_group
fpm_log_dir_mode
Data type: Stdlib::Filemode
Default value: $php::params::fpm_log_dir_mode
embedded
Data type: Boolean
Default value: false
dev
Data type: Boolean
Default value: true
composer
Data type: Boolean
Default value: true
pear
Data type: Boolean
Default value: $php::params::pear
pear_ensure
Data type: String
Default value: $php::params::pear_ensure
phpunit
Data type: Boolean
Default value: false
apache_config
Data type: Boolean
Default value: false
proxy_type
Data type: Optional[String[1]]
Default value: undef
proxy_server
Data type: Optional[String[1]]
Default value: undef
extensions
Data type: Hash
Default value: {}
settings
Data type: Hash
Default value: {}
cli_settings
Data type: Hash
Default value: {}
package_prefix
Data type: Optional[String[1]]
Default value: $php::params::package_prefix
config_root_ini
Data type: Stdlib::Absolutepath
Default value: $php::params::config_root_ini
config_root_inifile
Data type: Stdlib::Absolutepath
Default value: $php::params::config_root_inifile
ext_tool_enable
Data type: Optional[Stdlib::Absolutepath]
Default value: $php::params::ext_tool_enable
ext_tool_query
Data type: Optional[Stdlib::Absolutepath]
Default value: $php::params::ext_tool_query
ext_tool_enabled
Data type: Boolean
Default value: $php::params::ext_tool_enabled
log_owner
Data type: String
Default value: $php::params::fpm_user
log_group
Data type: String
Default value: $php::params::fpm_group
pool_purge
Data type: Boolean
Default value: $php::params::pool_purge
reload_fpm_on_config_changes
Data type: Boolean
Default value: true
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
Data type: Stdlib::Absolutepath
Default value: $php::params::apache_inifile
settings
Data type: Hash
Default value: {}
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
Data type: Stdlib::Absolutepath
Default value: $php::params::cli_inifile
settings
Data type: Hash
Default value: {}
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
Data type: String
Default value: $php::params::composer_source
path
Data type: Stdlib::Absolutepath
Default value: $php::params::composer_path
proxy_type
Data type: Optional[String[1]]
Default value: undef
proxy_server
Data type: Optional[String[1]]
Default value: undef
channel
Data type: Php::ComposerChannel
Default value: 'stable'
auto_update
Data type: Boolean
Default value: true
max_age
Data type: Integer
Default value: $php::params::composer_max_age
root_group
Data type: Variant[Integer, String]
Default value: $php::params::root_group
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
Data type: Integer[1]
source
Data type: String[1]
path
Data type: Stdlib::Absolutepath
channel
Data type: Php::ComposerChannel
Default value: 'stable'
proxy_type
Data type: Optional[String[1]]
Default value: undef
proxy_server
Data type: Optional[String[1]]
Default value: undef
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
Data type: String
Default value: $php::ensure
package
Data type: String
Default value: "${php::package_prefix}${php::params::dev_package_suffix}"
manage_repos
Data type: Boolean
Default value: $php::manage_repos
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
Data type: String
Default value: $php::ensure
package
Data type: String
Default value: "${php::package_prefix}${php::params::embedded_package_suffix}"
inifile
Data type: Stdlib::Absolutepath
Default value: $php::params::embedded_inifile
settings
Data type: Hash
Default value: {}
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
user
group
service_ensure
service_enable
service_name
service_provider
package
inifile
settings
global_pool_settings
pools
log_owner
log_group
pool_purge
reload_fpm_on_config_changes
ensure
Data type: Optional[String]
Default value: $php::ensure
user
Data type: String[1]
Default value: $php::fpm_user
group
Data type: String[1]
Default value: $php::fpm_group
service_ensure
Data type: Enum['running', 'stopped']
Default value: $php::fpm_service_ensure
service_enable
Data type: Boolean
Default value: $php::fpm_service_enable
service_name
Data type: String[1]
Default value: $php::fpm_service_name
service_provider
Data type: Optional[String[1]]
Default value: $php::fpm_service_provider
package
Data type: String
Default value: $php::real_fpm_package
inifile
Data type: Stdlib::Absolutepath
Default value: $php::fpm_inifile
settings
Data type: Hash
Default value: $php::real_settings
global_pool_settings
Data type: Hash
Default value: $php::real_fpm_global_pool_settings
pools
Data type: Hash
Default value: $php::real_fpm_pools
log_owner
Data type: String[1]
Default value: $php::log_owner
log_group
Data type: String[1]
Default value: $php::log_group
pool_purge
Data type: Boolean
Default value: $php::pool_purge
reload_fpm_on_config_changes
Data type: Boolean
Default value: $php::reload_fpm_on_config_changes
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
[manage_run_dir] Manage the run directory
Parameters
The following parameters are available in the php::fpm::config
class:
config_file
user
group
inifile
pid_file
settings
pool_base_dir
pool_purge
error_log
log_level
emergency_restart_threshold
emergency_restart_interval
process_control_timeout
process_max
rlimit_files
systemd_interval
log_owner
log_group
log_dir_mode
root_group
syslog_facility
syslog_ident
manage_run_dir
config_file
Data type: Stdlib::Absolutepath
Default value: $php::params::fpm_config_file
user
Data type: String
Default value: $php::params::fpm_user
group
Data type: String
Default value: $php::params::fpm_group
inifile
Data type: String
Default value: $php::params::fpm_inifile
pid_file
Data type: Stdlib::Absolutepath
Default value: $php::params::fpm_pid_file
settings
Data type: Hash
Default value: {}
pool_base_dir
Data type: Stdlib::Absolutepath
Default value: $php::params::fpm_pool_dir
pool_purge
Data type: Boolean
Default value: false
error_log
Data type: String
Default value: $php::params::fpm_error_log
log_level
Data type: String
Default value: 'notice'
emergency_restart_threshold
Data type: Integer
Default value: 0
emergency_restart_interval
Data type: Php::Duration
Default value: 0
process_control_timeout
Data type: Php::Duration
Default value: 0
process_max
Data type: Integer
Default value: 0
rlimit_files
Data type: Optional[Integer[1]]
Default value: undef
systemd_interval
Data type: Optional[Php::Duration]
Default value: undef
log_owner
Data type: String
Default value: $php::params::fpm_user
log_group
Data type: String
Default value: $php::params::fpm_group
log_dir_mode
Data type: Stdlib::Filemode
Default value: $php::params::fpm_log_dir_mode
root_group
Data type: String[1]
Default value: $php::params::root_group
syslog_facility
Data type: String
Default value: 'daemon'
syslog_ident
Data type: String
Default value: 'php-fpm'
manage_run_dir
Data type: Boolean
Default value: true
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
Data type: String[1]
Default value: $php::fpm::service_name
ensure
Data type: Enum['running', 'stopped']
Default value: $php::fpm::service_ensure
enable
Data type: Boolean
Default value: $php::fpm::service_enable
provider
Data type: Optional[String[1]]
Default value: $php::fpm::service_provider
reload_fpm_on_config_changes
Data type: Boolean
Default value: $php::fpm::reload_fpm_on_config_changes
php::global
The php::global class.
Parameters
The following parameters are available in the php::global
class:
inifile
Data type: Stdlib::Absolutepath
Default value: $php::config_root_inifile
settings
Data type: Hash
Default value: {}
php::globals
The php::globals class.
Parameters
The following parameters are available in the php::globals
class:
php_version
Data type: Optional[Pattern[/^(rh-)?(php)?[578](\.)?[0-9]/]]
Default value: undef
config_root
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
fpm_pid_file
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
rhscl_mode
Data type: Optional[Enum['rhscl', 'remi']]
Default value: undef
zend_creds
Data type: Optional[Hash]
Default value: undef
flavor
Data type: Enum['community', 'zend']
Default value: 'community'
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
Data type: String
Default value: $php::ensure
manage_repos
Data type: Boolean
Default value: $php::manage_repos
names_to_prefix
Data type: Array
Default value: prefix($php::params::common_package_suffixes, $php::package_prefix)
names
Data type: Array
Default value: $php::params::common_package_names
php::params
PHP params class
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
Data type: String
Default value: $php::pear_ensure
package
Data type: Optional[String]
Default value: undef
manage_repos
Data type: Boolean
Default value: $php::manage_repos
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
Data type: String
Default value: $php::params::phpunit_source
path
Data type: Stdlib::Absolutepath
Default value: $php::params::phpunit_path
root_group
Data type: String[1]
Default value: $php::params::root_group
auto_update
Data type: Boolean
Default value: true
max_age
Data type: Integer
Default value: $php::params::phpunit_max_age
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
Data type: Integer[1]
source
Data type: String[1]
path
Data type: Stdlib::Absolutepath
php::repo
Configure package repository
php::repo::debian
Configure debian apt repo
=== Parameters
[location] Location 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
Data type: String[1]
Default value: 'https://packages.dotdeb.org'
repos
Data type: String[1]
Default value: 'all'
include_src
Data type: Boolean
Default value: false
key
Data type: Hash
Default value:
{
'id' => '6572BBEF1B5FF28B28B706837E3F070089DF5277',
'source' => 'http://www.dotdeb.org/dotdeb.gpg',
}
dotdeb
Data type: Boolean
Default value: true
sury
Data type: Boolean
Default value: true
php::repo::redhat
The php::repo::redhat class.
Parameters
The following parameters are available in the php::repo::redhat
class:
yum_repo
Data type: String[1]
Default value: 'remi_php56'
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
Data type: String[1]
Default value: 'mayflower-php56'
baseurl
Data type: String[1]
Default value: 'http://download.opensuse.org/repositories/home:/mayflower:/php5.6_based/SLE_11_SP3/'
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
Data type: Pattern[/^\d\.\d/]
Default value: '5.6'
Defined types
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
Data type: String[1]
Default value: 'example.com'
docroot
Data type: Stdlib::Absolutepath
Default value: '/var/www'
port
Data type: Integer[1]
Default value: 80
default_vhost
Data type: Boolean
Default value: true
fastcgi_socket
Data type: String[1]
Default value: 'fcgi://127.0.0.1:9000/$1'
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
Data type: Stdlib::Absolutepath
config
Data type: Hash
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
Data type: String[1]
file
Data type: Stdlib::Absolutepath
value
Data type: Optional[Variant[Integer, String]]
Default value: undef
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
provider
source
so_name
ini_prefix
php_api_version
package_prefix
package_name
zend
settings
multifile_settings
sapi
settings_prefix
responsefile
header_packages
compiler_packages
install_options
ensure
Data type: String
Default value: $php::ensure
provider
Data type: Optional[Php::Provider]
Default value: undef
source
Data type: Optional[String]
Default value: undef
so_name
Data type: Optional[String]
Default value: undef
ini_prefix
Data type: Optional[String]
Default value: undef
php_api_version
Data type: Optional[String]
Default value: undef
package_prefix
Data type: String
Default value: $php::package_prefix
package_name
Data type: Optional[String[1]]
Default value: undef
zend
Data type: Boolean
Default value: false
settings
Data type: Variant[Hash, Hash[String, Hash]]
Default value: {}
multifile_settings
Data type: Boolean
Default value: false
sapi
Data type: Php::Sapi
Default value: 'ALL'
settings_prefix
Data type: Variant[Boolean, String]
Default value: false
responsefile
Data type: Optional[Stdlib::AbsolutePath]
Default value: undef
header_packages
Data type: Variant[String, Array[String]]
Default value: []
compiler_packages
Data type: Variant[String, Array[String]]
Default value: $php::params::compiler_packages
install_options
Data type: Php::InstallOptions
Default value: undef
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
Data type: String
Default value: 'installed'
provider
Data type: Optional[Php::Provider]
Default value: undef
so_name
Data type: Optional[String]
Default value: downcase($name)
ini_prefix
Data type: Optional[String]
Default value: undef
php_api_version
Data type: Optional[String]
Default value: undef
zend
Data type: Boolean
Default value: false
settings
Data type: Hash
Default value: {}
settings_prefix
Data type: Variant[Boolean, String]
Default value: false
sapi
Data type: Php::Sapi
Default value: 'ALL'
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
provider
source
package_prefix
package_name
responsefile
header_packages
compiler_packages
install_options
ensure
Data type: String
Default value: 'installed'
provider
Data type: Optional[Php::Provider]
Default value: undef
source
Data type: Optional[String]
Default value: undef
package_prefix
Data type: String
Default value: $php::package_prefix
package_name
Data type: Optional[String[1]]
Default value: undef
responsefile
Data type: Optional[Stdlib::AbsolutePath]
Default value: undef
header_packages
Data type: Variant[String, Array[String]]
Default value: []
compiler_packages
Data type: Variant[String, Array[String]]
Default value: $php::params::compiler_packages
install_options
Data type: Php::InstallOptions
Default value: undef
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
listen
listen_backlog
listen_allowed_clients
listen_owner
listen_group
listen_mode
user
group
apparmor_hat
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
access_log_format
request_terminate_timeout
request_slowlog_timeout
security_limit_extensions
slowlog
template
rlimit_files
rlimit_core
chroot
chdir
catch_workers_output
include
env
env_value
clear_env
options
php_value
php_flag
php_admin_value
php_admin_flag
php_directives
root_group
base_dir
ensure
Data type: Enum['present', 'absent']
Default value: 'present'
listen
Data type: String[1]
Default value: '127.0.0.1:9000'
listen_backlog
Data type: Integer[-1]
Default value: -1
listen_allowed_clients
Data type: Optional[String[1]]
Default value: undef
listen_owner
Data type: Optional[String[1]]
Default value: undef
listen_group
Data type: Optional[String[1]]
Default value: undef
listen_mode
Data type: Optional[Stdlib::Filemode]
Default value: undef
user
Data type: String[1]
Default value: $php::fpm::config::user
group
Data type: String[1]
Default value: $php::fpm::config::group
apparmor_hat
Data type: Optional[String[1]]
Default value: undef
pm
Data type: String[1]
Default value: 'dynamic'
pm_max_children
Data type: Integer[1]
Default value: 50
pm_start_servers
Data type: Integer[0]
Default value: 5
pm_min_spare_servers
Data type: Integer[0]
Default value: 5
pm_max_spare_servers
Data type: Integer[0]
Default value: 35
pm_max_requests
Data type: Integer[0]
Default value: 0
pm_process_idle_timeout
Data type: Php::Duration
Default value: '10s'
pm_status_path
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
ping_path
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
ping_response
Data type: String[1]
Default value: 'pong'
access_log
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
access_log_format
Data type: String[1]
Default value: '"%R - %u %t \"%m %r\" %s"'
request_terminate_timeout
Data type: Php::Duration
Default value: 0
request_slowlog_timeout
Data type: Php::Duration
Default value: 0
security_limit_extensions
Data type: Array[String[1]]
Default value: []
slowlog
Data type: Stdlib::Absolutepath
Default value: "/var/log/php-fpm/${name}-slow.log"
template
Data type: String[1]
Default value: 'php/fpm/pool.conf.erb'
rlimit_files
Data type: Optional[Integer]
Default value: undef
rlimit_core
Data type: Optional[Integer]
Default value: undef
chroot
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
chdir
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
catch_workers_output
Data type: Enum['yes', 'no']
Default value: 'no'
include
Data type: Optional[String[1]]
Default value: undef
env
Data type: Array[String[1]]
Default value: []
env_value
Data type: Hash
Default value: {}
clear_env
Data type: Boolean
Default value: true
options
Data type: Hash
Default value: {}
php_value
Data type: Hash
Default value: {}
php_flag
Data type: Hash
Default value: {}
php_admin_value
Data type: Hash
Default value: {}
php_admin_flag
Data type: Hash
Default value: {}
php_directives
Data type: Array[String[1]]
Default value: []
root_group
Data type: String[1]
Default value: $php::params::root_group
base_dir
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Functions
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
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
Php::ComposerChannel
The Php::ComposerChannel data type.
Alias of Enum['stable', 'preview', 'snapshot', '1', '2']
Php::Duration
A duration in seconds are with an unit
Alias of Variant[Integer[0], Pattern[/^\d+[smhd]?$/]]
Php::InstallOptions
The Php::InstallOptions data type.
Alias of
Optional[Array[
Variant[
String,
Hash[String, String]
]
]]
Php::Provider
The Php::Provider data type.
Alias of Enum['none', 'pecl', 'pear', 'dpkg', 'apt', 'yum', 'rpm', 'dnf', 'up2date', 'zypper', 'rug', 'freebsd', 'pkgng', 'ports', 'portupgrade']
Php::Sapi
The Php::Sapi data type.
Alias of Enum['ALL', 'cli', 'fpm', 'apache2']
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v10.2.0 (2024-06-04)
Implemented enhancements:
Fixed bugs:
Merged pull requests:
- disable Arch Linux testing because it is breaking the CI constantly #709 (rwaffen)
- Remove legacy top-scope syntax #706 (smortex)
v10.1.0 (2023-11-28)
Implemented enhancements:
Closed issues:
- Dependency conflict between puppet-php and puppet-zypprepo #701
v10.0.0 (2023-09-22)
Breaking changes:
Closed issues:
- (Old?) Documentation is not available #577
Merged pull requests:
v9.0.0 (2023-08-08)
Breaking changes:
- Drop Puppet 6 support #683 (bastelfreak)
Implemented enhancements:
- Add Puppet 8 support #692 (bastelfreak)
- puppetlabs/stdlib: Allow 9.x #691 (bastelfreak)
- Add class parameter
fpm_log_dir_mode
to customize the file permission of log directory #675 (Q-Storm) - Add ZendPHP support #671 (jbh)
Closed issues:
- Use Stable composer install instead of latest #583
Merged pull requests:
- puppetlabs/inifile: Allow 6.x #693 (smortex)
- Add option to disable management of rundir #674 (tmanninger)
v8.2.0 (2023-01-27)
Implemented enhancements:
- Add Ubuntu 22.04 support #672 (martialblog)
- Allow up-to-date dependencies #667 (smortex)
- Support other versions of remi repo on redhat #495 (edestecd)
Fixed bugs:
Merged pull requests:
- Fix broken MIT license #678 (bastelfreak)
v8.1.1 (2022-08-03)
Fixed bugs:
- Why does dotdeb APT wheezy 5.6 repo get installed on Debian 9? #458
- (#458) Remove dotdeb and sury repos overuse on Debian #659 (OlegPS)
Closed issues:
- Howto solve package name conflict between apt and pecl #579
v8.1.0 (2022-07-03)
Implemented enhancements:
Fixed bugs:
- php-fpm: Reload service with systemd if available #664 (bastelfreak)
- Arch Linux: Fix package names and set correct php-fpm user (root -> http) #663 (jkroepke)
v8.0.3 (2022-03-21)
Fixed bugs:
Closed issues:
v8.0.2 (2021-09-06)
Fixed bugs:
v8.0.1 (2021-08-27)
Fixed bugs:
Closed issues:
- String[1] forbids empty php::settings value #639
v8.0.0 (2021-08-26)
Breaking changes:
- Drop EOL FreeBSD 9 and 10 from metadata.json #591
- Drop Debian 9/Ubuntu 16.04 support #636 (root-expert)
- Drop support for Puppet 5 (EOL) #631 (smortex)
- Drop support for RedHat 6 / CentOS 6 (EOL) #630 (smortex)
- Drop EOL Debian 7/8 & Ubuntu 12/14 #592 (bastelfreak)
Implemented enhancements:
- Add/Fix data types of all parameters #634 (smortex)
- Add support for Debian 11 #633 (smortex)
- Add support for Puppet 7 #632 (smortex)
- Add PHP 8 Support #627 (bratucornel)
- puppet/archive: allow 5.x #620 (bastelfreak)
- php::globals: support Ubuntu 20.04 that ships php 7.4 #599 (simondeziel)
- php-fpm: Make service reload/restart configurable #598 (bastelfreak)
- Add apparmor_hat support to php::fpm::pool #524 (simondeziel)
Closed issues:
- remove puppet 5 support, introduce puppet 7 support #616
- php reloading on each run #613
- Is it possible to ensure the fpm service from hiera? #609
- Restart service 'php-fpm' if socket owner / group changes #596
- Support for Ondřej Surýs PPA on Ubuntu 18.04 #586
- Unused variable 'log_group_final' #568
- New Release 7.0.0+ ? #562
- undesired service restart due to missing /var/run/php-fpm dir #501
- New Release after Ubuntu 18.04 support is added? #442
- Deprecate mayflower/php in favor for voxpupuli/php #348
Merged pull requests:
- Allow up-to-date dependencies #635 (smortex)
- Update dependencies #629 (saz)
- Remove duplicate mysqlnd from example in README #574 (saz)
- remove www pool from defaults #572 (bovy89)
- Cleanup fpm config class #570 (paescuj)
v7.1.0 (2020-05-05)
Implemented enhancements:
- add ability to define composer update channel #571 (CyberLine)
- add pool_purge option to init.pp #557 (bovy89)
- Improve package prefix selection on FreeBSD #552 (oxc)
Fixed bugs:
- Fix enabling of zend extensions #567 (coreyralph)
- Fix running apt update on Debian family #554 (Hexta)
- Do a
deep
merge onfpm
lookup #550 (sigv)
Closed issues:
- mod 'puppetlabs-inifile', '4.1.0' #566
- Fpm config results in "expects a Hash value, got Tuple" #536
- composer created as folder not binary file #535
- Forge Release #528
- Invalid tag 'php::config' on node ... #177
Merged pull requests:
- delete legacy travis directory #556 (bastelfreak)
- allow puppetlabs/inifile 4.x #553 (bastelfreak)
- Clean up acceptance spec helper #551 (ekohl)
v7.0.0 (2019-09-12)
Breaking changes:
- Drop Ubuntu 14.04 #520 (bastelfreak)
- Do not manage mysql.ini when using Ubuntu repo (and fix CI) #519 (smortex)
- modulesync 2.5.1 and drop Puppet 4 #507 (bastelfreak)
Implemented enhancements:
- Remove hard dependency from apt-transport-https #454
- use php::global::php_version for php::repo::* version #222
- refactor php::repo::debian to use the version variable #219
- push back hard dependency on hiera #215
- Support PHP 7.0 on FreeBSD #207
- set default version for debian buster and add support for buster #530 (lelutin)
- Simplify php (extension) removal #526 (TuningYourCode)
- Rely more on puppetlabs-apt #494 (ekohl)
- Add cli_settings parameter to php class #491 (sunnz)
- Allow
clear_env
to be disabled #483 (joshuaspence) - allow php 7.2 #455 (cbergmann)
Fixed bugs:
- Fixed repositories managed for all patch version of 7.x for Ubuntu. #505 (Conzar)
- Fix php::fpm eternal reload for mysqli a simplexml extension #503 (miranovy)
Closed issues:
- No default version for debian buster in globals #529
- php module is not using hiera deep merge anymore. #500
- Extension mysqli causes php7-fpm to reload #497
- Cannot declare both php and php::cli classes #489
- PHP modules are enabled even when ensure is absent #477
- The "PHP 7.1 install from hell" on Debian 9 #459
- PHP 7.1 on Debian 9 #457
- Wrong merge behavior for settings, extensions, fpm_pools, fpm_global_pool_settings #434
- Ubuntu 16 mysql extension so name with packages from ondrej PPA #309
Merged pull requests:
- fix "cannot redefine $real_settings" error #533 (crispygoth)
- hotfix:: updating key id for debian repo sury #532 (caherrera)
- Fix deprecated Hiera lookup warnings. Add default www pool in YAML. #522 (comport3)
- Allow
puppetlabs/stdlib
6.x andpuppet/archive
4.x #521 (alexjfisher) - Allow puppetlabs/apt 7.x, puppetlabs/inifile 3.x #518 (dhoppe)
- Simplify ensure check #493 (amateo)
v6.0.2 (2018-10-14)
Fixed bugs:
Closed issues:
- Ubuntu 18.04 issue just installing #475
Merged pull requests:
v6.0.1 (2018-10-06)
Fixed bugs:
- Fix enable extension when there is no module associated #479 (amateo)
- Remove config when module is ensured to absent #478 (amateo)
Closed issues:
- "php::manage_repos: true" causes failure on Ubuntu 18.04, needs newer puppetlabs-apt version(>=5.0.0) #467
Merged pull requests:
- modulesync 2.1.0 and allow puppet 6.x #481 (bastelfreak)
- Add acceptance tests for system php with extensions #476 (bastelfreak)
- Allow puppetlabs/stdlib 5.x and puppetlabs/apt 6.x #472 (bastelfreak)
v6.0.0 (2018-07-29)
Breaking changes:
Implemented enhancements:
- Compatibility with Software collections (SCL) #451 (oranenj)
- Add Debian 9 support #440 (SimonHoenscheid)
- Add initial ubuntu 18.04 support #428 (jkroepke)
Fixed bugs:
- php.ini not updated #422
- Error: Could not upgrade module 'puppet-php' (v4.0.0 -> v5.0.0) #378
- Fix paths for phpunit on FreeBSD #291 (bitnexus)
Closed issues:
- Debian 9 (Stretch) support #439
- Repository class switch failing on Ubuntu #392
- Next stable release? #352
- PHP extensions loaded twice #341
- PECL/Extension checks for beta packages #73
Merged pull requests:
- Update README.md with working RHSCL example. #463 (Tamerz)
- enable ubuntu 18.04 acceptance tests #462 (bastelfreak)
- drop EOL OSs; fix puppet version range #453 (bastelfreak)
- Rely on beaker-hostgenerator for docker nodesets #452 (ekohl)
- mark private classes with assert_private() #447 (bastelfreak)
- migrate vars from topscope to relative scope #444 (bastelfreak)
- bump puppet to latest supported version 4.10.0 #443 (bastelfreak)
- Update puppet/archive dependency #438 (marknl)
- switch the dotdeb repo url to https #431 (bastelfreak)
v5.3.0 (2018-03-06)
Implemented enhancements:
- mark Ubuntu 16.04 as supported and fix its tests #221
- Using the new facts hash instead of the global var in repo/debian.pp #425 (c33s)
- Add Acceptance tests #414 (bastelfreak)
Fixed bugs:
- Fix Archlinux support #423 (bastelfreak)
- Fix wrongly named parameters for apt::source/key #420 (bitcrush)
- manage software-properties-common on ubuntu #419 (bastelfreak)
Merged pull requests:
- add examples for php-fpm/nginx #424 (bastelfreak)
- add tests for php5.6 #418 (bastelfreak)
v5.2.0 (2018-02-14)
Implemented enhancements:
- add ubuntu 16.04 support #412 (bastelfreak)
- Add PHP 7.1 support on Debian #293 (fstr)
Fixed bugs:
- Auto_update not idempotent #402
- use correct require arguments #415 (bastelfreak)
- fix composer auto_update idempotency in case no update is available #408 (joekohlsdorf)
- Fixing wrong pear package name in Amazon Linux #399 (gdurandvadas)
Closed issues:
- Upgrade to work with Puppet5 #406
- php 7.2 + ubuntu 16.04 - pdo-mysql extension not installing correctly #405
- config_root parameter does nothing on RHEL7 #397
Merged pull requests:
- Deprecate hiera_hash functions #410 (minorOffense)
- mark Puppet 5 as supported #407 (joekohlsdorf)
- Change default RedHat params to use config_root #398 (DALUofM)
v5.1.0 (2017-11-10)
Fixed bugs:
- Fix syntax issues with data types #385 (craigwatson)
- fix ubuntu 17.04 version for php7 #383 (arudat)
- Fix OS fact comparison for Ubuntu 12 and 14 #375 (dbeckham)
- Fix OS facts usage when selecting repo class for Ubuntu systems #374 (dbeckham)
- Confine pecl provider to where pear command is available #364 (walkamongus)
- fix default value of php::fpm::pool::access_log_format #361 (lesinigo)
Closed issues:
- Debian repository classes are being selected on Ubuntu systems #373
- Changes in #357 break Ubuntu version dependent resources #372
Merged pull requests:
- Proposed fix for failing parallel spec tests #386 (wyardley)
- update dependencies in metadata #379 (mmoll)
- Bump metadata.json version to 5.0.1-rc #377 (dhollinger)
- bump dep on puppet/archive to '\< 3.0.0' #376 (costela)
- Add missing php-fpm user and group class param docs #346 (dbeckham)
v5.0.0 (2017-08-07)
Summary
This backwards-incompatible release drops puppet 3, PHP 5.5 on Ubuntu, and the deprecated php::extension
parameter pecl_source
. It improves much of the internal code quality, and adds several useful features the most interesting of which is probably the php::extension
parameter ini_prefix
.
Changed
- Drop puppet 3 compatibility.
- Bumped puppetlabs-apt lower bound to 4.1.0
- Bumped puppetlabs-stdlib lower bound to 4.13.1
Removed
- Deprecated
php::extension
define parameterspecl_source
. Usesource
instead. - PHP 5.5 support on ubuntu.
Added
php
class parametersfpm_user
andfpm_group
to customize php-fpm user/group.php::fpm
class parametersuser
andgroup
.php::fpm::pool
define parameterpm_process_idle_timeout
and pool.confpm.process_idle_timeout
directive.php::extension
class parametersini_prefix
andinstall_options
.- Archlinux compatibility.
- Bumped puppetlabs-apt upper bound to 5.0.0
Fixed
- Replaced validate functions with data types.
- Linting issues.
- Replace legacy facts with facts hash.
- Simplify
php::extension
- Only apt dependency when
manage_repos => true
- No more example42/yum dependency
2017-02-11 Release 4.0.0
This is the last release with Puppet3 support!
- Fix a bug turning
manage_repos
off on wheezy - Fix a deprecation warning on
apt::key
when usingmanage_repos
on wheezy (#110). This change requires puppetlabs/apt at >= 1.8.0 - Allow removal of config values (#124)
- Add
phpversion
fact, for querying through PuppetDB or Foreman (#119) - Allow configuring the fpm pid file (#123)
- Add embedded SAPI support (#115)
- Add options to fpm config and pool configs (#139)
- Add parameter logic for PHP 7 on Ubuntu/Debian (#180)
- add SLES PHP 7.0 Support (#220)
- allow packaged extensions to be loaded as zend extensions
- Fix command to enable php extensions (#226)
- Fix many rucocop warnings
- Update module Ubuntu 14.04 default to official repository setup
- Fix dependency for extentions with no package source
- Allow packaged extensions to be loaded as Zend extensions
- Support using an http proxy for downloading composer
- Refactor classes php::fpm and php::fpm:service
- Manage apache/PHP configurations on Debian and RHEL systems
- use voxpupuli/archive to download composer
- respect $manage_repos, do not include ::apt if set to false
- Bump min version_requirement for Puppet + deps
- allow pipe param for pecl extensions
- Fix: composer auto_update: exec's environment must be array
Breaking Changes
- Deep merge
php::extensions
the same way asphp::settings
. This technically is a breaking change but should not affect many people. - PHP 5.6 is the default version on all systems now (except Ubuntu 16.04, where 7.0 is the default).
- There's a php::globals class now, where global paramters (like the PHP version) are set. (#132)
- Removal of php::repo::ubuntu::ppa (#218)
3.4.2
- Fix a bug that changed the default of
php::manage_repos
tofalse
on Debian-based operating systems except wheezy. It should be turned on by default. (#116) - Fix a bug that prevented reloading php-fpm on Ubuntu in some cases. (#117, #107)
3.4.1
- Fix reloading php-fpm on Ubuntu trusty & utopic (#107)
3.4.0
- New parameter
ppa
for classphp::repo::ubuntu
to specify the ppa name to use. We default toondrej/php5-oldstable
for precise andondrej/php5
otherwise. - New parameter
include
forphp::fpm::pool
resources to specify custom configuration files.
3.3.1
- Make
systemd_interval
parameter for classphp::fpm::config
optional
3.3.0
php::extension
resources:- New boolean parameter
settings_prefix
to automatically prefix all settings keys with the extensions names. Defaults to false to ensurre the current behaviour. - New string parameter
so_name
to set the DSO name of an extension if it doesn't match the package name. - New string parameter
php_api_version
to set a custom api version. If notundef
, theso_name
is prefixed with the full module path in the ini file. Defaults toundef
.
- New boolean parameter
- The default of the parameter
listen_allowed_clients
ofphp::fpm::pool
resources is nowundef
instead of'127.0.0.1'
. This way it is more intuitive to change the default tcp listening socket at127.0.0.1:9000
to a unix socket by only setting thelisten
parameter instead of additionally needing to unsetlisten_allowed_clients
. This has no security implications. - New parameters for the
php::fpm::config
class:error_log
syslog_facility
syslog_ident
systemd_interval
- A bug that prevented merging the global
php::settings
parameter into SAPI configs forphp::cli
andphp::fpm
was fixed. - The dotdeb repos are now only installed for Debian wheezy as Debian jessie has a sufficiently recent PHP version.
3.2.2
- Fix a typo in hiera keys
php::settings
&php::fpm::settings
(#83)
3.2.1
- Fixed default
yum_repo
key inphp::repo::redhat
- On Ubuntu precise we now use the ondrej/php5-oldstable ppa. This can be
manually enabled with by setting
$php::repo::ubuntu::oldstable
totrue
. $php::ensure
now defaults topresent
instead oflatest
. Though, strictly speaking, this represents a functional change, we consider this to be a bugfix because automatic updates should be enabled explicitely.$php::ensure
is not anymore passed tophp::extension
resources as default ensure parameter because this doesn't make sense.
3.2.0
- Support for FreeBSD added by Frank Wall
- RedHat now uses remi-php56 yum repo by default
- The resource
php::fpm::pool
is now public, you can use it in your manifests without using$php::fpm::pools
- We now have autogenerated documentation using
puppetlabs/strings
3.1.0
- New parameter
pool_purge
forphp::extension
to remove files not managed by puppet from the pool directory. - The
pecl_source
parameter forphp::extension
was renamend tosource
because it is also useful for PEAR extensions.pecl_source
can still be used but is deprecated and will be removed in the next major release. - Parameters referring to time in
php::fpm::config
can now be specified with units (i.e.'60s'
,'1d'
):emergency_restart_threshold
emergency_restart_interval
process_control_timeout
- The PEAR version is not independant of
$php::ensure
and can be configured with$php::pear_ensure
- Give special thanks to the contributors of this release:
- Petr Sedlacek
- Sherlan Moriah
3.0.1
- Fix typo in package suffix for php-fpm on RHEL in params.pp
3.0.0
- Removes
$php::fpm::pool::error_log
. Use thephp_admin_flag
andphp_admin_value
parameters to set the php settingslog_errors
anderror_log
instead. - Removes support for PHP 5.3 on Debian-based systems. See the notes in the README for more information.
- Removes the
php_version
fact which had only worked on the later puppet runs. - Moves CLI-package handling to
php::packages
- Allows changing the package prefix via
php::package_prefix
. - Moves FPM-package handling from
php::fpm::package
tophp::fpm
- Changes
php::packages
, so thatphp::packages::packages
becomesphp::packages::names
and are installed andphp::packages::names_to_prefix
are installed prefixed byphp::package_prefix
. - PHPUnit is now installed as phar in the same way composer is installed, causing all parameters to change
- The
php::extension
resource has a new parameter:zend
. If set to true, exenstions that were installed with pecl are loaded withzend_extension
.
2.0.4
- Style fixes all over the place
- Module dependencies are now bound to the current major version
2.0.3
- Some issues & bugs with extensions were fixed
- If you set the
provider
parameter of an extension to"none"
, no extension packages will be installed - The EPEL yum repo has been added for RedHat systems
2.0.2
- Adds support for
header_packages
on all extensions - Adds
install_options
to pear package provider
2.0.1
- This is a pure bug fix release
- Fix for CVE 2014-0185 (https://bugs.php.net/bug.php?id=67060)
2.0.0
- Remove augeas and switch to puppetlabs/inifile for configs
- Old:
settings => [‘set PHP/short_open_tag On‘]
- New:
settings => {‘PHP/short_open_tag’ => ‘On‘}
- Old:
- Settings parmeter cleanups
- The parameter
config
ofphp::extension
resources is now calledsettings
- The parameters
user
andgroup
ofphp::fpm
have been moved tophp::fpm::config
- New parameter
php::settings
for global settings (i.e. CLI & FPM)
- The parameter
- New parameter
php::cli
to disable CLI if supported
1.1.2
- SLES: PHP 5.5 will now be installed
- Pecl extensions now autoload the .so based on $name instead of $title
1.1.1
- some nasty bugs with the pecl php::extension provider were fixed
- php::extension now has a new pecl_source parameter for specifying custom source channels for the pecl provider
1.1.0
- add phpunit to main class
- fix variable access for augeas
1.0.2
- use correct suse apache service name
- fix anchoring of augeas
1.0.1
- fixes #9 undefined pool_base_dir
1.0.0
Initial release
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 9.0.0 < 10.0.0)
- puppetlabs/apt (>= 4.4.0 < 10.0.0)
- puppetlabs/inifile (>= 1.4.1 < 7.0.0)
- puppet/zypprepo (>= 2.0.0 < 6.0.0)
- puppet/archive (>= 1.0.0 < 8.0.0)
MIT License Copyright (c) 2012-2013 Christian "Jippi" Winther <jippignu@gmail.com> Copyright (c) 2012-2013 Tobias Nyholm <tobias@happyrecruiting.se> Copyright (c) 2014-2015 Mayflower GmbH <devops@mayflower.de> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.