Defined Type: php::setting

Defined in:
manifests/setting.pp

Overview

Define PHP settings in the php.ini file.

Examples:

A sample setting

include ::php

::php::setting { 'PHP/engine':
  value => 'On',
}

Parameters:

  • value (String)
  • ensure (Enum['present', 'absent']) (defaults to: 'present')
  • setting (String) (defaults to: $title)

See Also:

Since:

  • 1.0.0



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'manifests/setting.pp', line 17

define php::setting (
  String                    $value,
  Enum['present', 'absent'] $ensure  = 'present',
  String                    $setting = $title,
) {

  if ! defined(Class['::php']) {
    fail('You must include the php base class before using any php defined resources')
  }

  php_ini_setting { $setting:
    ensure => $ensure,
    value  => $value,
  }
}