Forge Home


Deploys, configure and maintain PHP-FPM


7,632 latest version

2.4 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

  • 1.0.3 (latest)
  • 1.0.1
released Jun 7th 2016
This version is compatible with:
  • Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >=4.0.0 <5.0.0

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'lostinmalloc-phpfpm', '1.0.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add lostinmalloc-phpfpm
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install lostinmalloc-phpfpm --version 1.0.3

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Tags: php, fpm, fastcgi


lostinmalloc/phpfpm — version 1.0.3 Jun 7th 2016


Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Reference
  6. Limitations
  7. Contact


The lostinmalloc-phpfpm module manages both PHP5 and PHP-FPM, the FastCGI Process Manager. It is distributed through the Apache License 2.0. Please do refer to the LICENSE for details.

Module Description

The lostinmalloc-phpfpm module allows the client to install, customize and manage PHP-FPM, the FastCGI Process Manager for PHP. It takes care of installing all the required dependencies, which include php5 itself, as well as other packages such as php5-curl and php5-mysql. If the client believes or requires extra dependencies to be installed, he can provide them to lostinmalloc-phpfpm, which will take care to install them.

At the moment, lostinmalloc-phpfpm does allow the client to customize only 2 settings of the daemon:

  • post_max_size
  • upload_max_filesize

What lostinmalloc-phpfpm does

The lostinmalloc-phpfpm module is responsible of:

  • Installing PHP5.
  • Installing PHP5-FPM.
  • Customizing the PHP5-FPM configuration of the daemon.
  • Making sure the PHP5-FPM service is up and running.

What lostinmalloc-phpfpm does not

The lostinmalloc-phpfpm module is not responsible of:

  • Resolving conflicts between Apache and Nginx. The dependencies required by php5-fpm, indeed, do end up installing apache2, which, by default, starts and binds to port 80. Should the client prefer Nginx, he must take care to remove/disable Apache.
  • Customizing the web server. In particular, while lostinmalloc-phpfpm does allow the client to change the maximum size of both the upload and a POST, it does not change anything in the settings of the web server used. This could end up in large files being uploaded to be rejected not because of PHP itself, but because of either Apache or Nginx.


In order to install lostinmalloc-phpfpm, run the following command:

$ sudo puppet module install lostinmalloc-phpfpm

Once installed, creating an instance of lostinmalloc-phpfpm on a node is a simple as:

node '' {
  class { 'phpfpm': }

The module does expect all the data to be provided through 'Hiera'. See Usage for examples on how to configure it.


In terms of requirements lostinmalloc-phpfpm demands:

  • puppet >=4.0.0


As aforementioned, lostinmalloc-phpfpm expects all the data to be provided through Hiera.

In the example below, we are going to set the following:

  • We are installing an extra dependency, cmatrix, through APT.
  • We are setting the maximum size of a POST to 100MB.
  • We are setting the maximum size of an upload to 100MB.
  cmatrix: 'apt'
  max_size_post: '100M'
  max_size_upload: '100M'


Attributes written in italic, are optional:

  • extra_dependencies: a hash representing extra dependencies that the client wants to install. The information must be provided in the form package_name : provider. lostinmalloc-phpfpm takes care to merge both the mandatory and the extra dependencies into a unique hash and install any of the dependencies that are currently not present.
  • limits: a hash representing the configuration of the php5-fpm daemon. At the moment, the following options can be customized:
  • max_size_post: it defines the maximum size, in megabytes, of a POST.
  • max_size_upload: it defines the maximum size, in megabytes, of an upload.


lostinmalloc-phpfpm has been developed and tested on the following setup(s):

  • Operating Systems:
    • Debian 7 Wheezy (3.2.68-1+deb7u3 x86_64)
    • Debian 8 Jessie (3.16.7-ckt11-1+deb8u3 x86_64)
  • Puppet
    • 4.2.1
  • Hiera
    • 3.0.1
  • Facter
    • 2.4.4
  • Ruby
    • 2.1.6p336


You can contact me through:

Please feel free to report any bug and suggest new features/improvements.