Version information
This version is compatible with:
- Puppet Enterprise 3.x
- Puppet 3.x
- Ubuntu, Debian, RedHat, CentOS, SLES
This module has been deprecated by its author since Nov 13th 2018.
The reason given was: This module has been adopted by Vox Pupuli.
The author has suggested puppet-php as its replacement.
Start using this module
Documentation
puppet-php
puppet-php
is a Puppet module for managing PHP, in particular php-fpm.
This originally was a fork of jippi/puppet-php (nodes-php on Puppet Forge) but has since been rewritten in large parts.
Usage
The module aims to use sane defaults and be easily configurable with hiera.
The recommended way is to use the main class to install php with following defaults:
class { '::php':
manage_repos => true,
cli => true,
fpm => true,
dev => true,
composer => true,
pear => true,
phpunit => false,
extensions => {}
}
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.
Defining php.ini settings
Can be defined as parameter settings
on php::{fpm, cli}
classes or
php::extension
resources. The recommended way is to use hiera:
php::cli::settings:
Date/date.timezone: Europe/London
PHP/short_open_tag: 'On'
Installing extensions
Extensions can be installed either by using the parameter extensions
in
the main class or by defining the hash php::extensions
in hiera.
php::extensions:
json: {}
mysql: {}
memcached:
provider: pecl
header_packages:
- libmemcached-dev
apc:
package_prefix: php-
settings:
apc.stat: 1
apc.stat_ctime: 1
Source Code
The source can be found at github.com/Mayflower/puppet-php.
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 simply create an issue adding steps to let us reproduce the bug.
If you have a good idea for a feature, please create an issue to discuss it. Pull requests are always more than welcome.
License
The project is released under the permissive MIT license.
Changelog
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
Dependencies
- puppetlabs/stdlib (>= 4.2.0)
- puppetlabs/apt (> 0.0.0)
- puppetlabs/inifile (>= 1.0.0)
- darin/zypprepo (> 0.0.0)