Forge Home

php

Puppet module to manage PHP

491,351 downloads

163,849 latest version

3.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 999.999.999 (deleted)
  • 4.0.0-beta1 (latest)
  • 3.4.2
  • 3.4.1
  • 3.4.0
  • 3.3.1
  • 3.3.0
  • 3.2.2
  • 3.2.1
  • 3.2.0
  • 3.1.0
  • 3.0.1
  • 3.0.0
  • 2.0.4
  • 2.0.3
  • 2.0.2
  • 2.0.1
  • 2.0.0
  • 1.1.3
  • 1.1.2
  • 1.1.1
  • 1.1.0
  • 1.0.2
  • 1.0.1
  • 1.0.0
released Sep 26th 2014
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

mayflower/php — version 2.0.2 Sep 26th 2014

puppet-php

Build Status

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.