Defined Type: php::ini
- Defined in:
- manifests/ini.pp
Overview
Define: php::ini
Definition to create a php.ini file. Typically used once per node where php will be used, to configure the content of the main /etc/php.ini file.
Sample Usage:
Php::Ini {
expose_php => 'Off',
}
php::ini { '/etc/php.ini':
display_errors => 'On',
}
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'manifests/ini.pp', line 14
define php::ini (
$ensure = undef,
$template = 'php/php.ini-el6.erb',
# php.ini options in the order they appear in the original file
$user_ini_filename = '.user.ini',
$user_ini_cache_ttl = '300',
$engine = 'On',
$short_open_tag = 'Off',
$asp_tags = 'Off',
$precision = '14',
$output_buffering = '4096',
$zlib_output_compression = 'Off',
$implicit_flush = 'Off',
$serialize_precision = '100',
$allow_call_time_pass_reference = 'Off',
$safe_mode = 'Off',
$safe_mode_gid = 'Off',
$safe_mode_include_dir = '',
$safe_mode_exec_dir = '',
$safe_mode_allowed_env_vars = 'PHP_',
$safe_mode_protected_env_vars = 'LD_LIBRARY_PATH',
$disable_functions = '',
$disable_classes = '',
$ignore_user_abort = undef,
$realpath_cache_size = undef,
$realpath_cache_ttl = undef,
$expose_php = 'On',
$max_execution_time = '30',
$max_input_time = '60',
$max_input_vars = '1000',
$memory_limit = '128M',
$error_reporting = 'E_ALL & ~E_DEPRECATED',
$display_errors = 'Off',
$display_startup_errors = 'Off',
$log_errors = 'On',
$log_errors_max_len = '1024',
$ignore_repeated_errors = 'Off',
$ignore_repeated_source = 'Off',
$report_memleaks = 'On',
$track_errors = 'Off',
$html_errors = 'Off',
$error_log = undef,
$variables_order = 'GPCS',
$request_order = 'GP',
$register_globals = 'Off',
$register_long_arrays = 'Off',
$register_argc_argv = 'Off',
$auto_globals_jit = 'On',
$post_max_size = '8M',
$magic_quotes_gpc = 'Off',
$magic_quotes_runtime = 'Off',
$magic_quotes_sybase = 'Off',
$auto_prepend_file = '',
$auto_append_file = '',
$default_mimetype = 'text/html',
$default_charset = undef,
$always_populate_raw_post_data = undef,
$include_path = undef,
$doc_root = '',
$user_dir = '',
$enable_dl = 'Off',
$cgi_fix_pathinfo = undef,
$file_uploads = 'On',
$upload_tmp_dir = undef,
$upload_max_filesize = '2M',
$max_file_uploads = '20',
$allow_url_fopen = 'On',
$allow_url_include = 'Off',
$default_socket_timeout = '60',
$date_timezone = undef,
$pcre_backtrack_limit = undef,
$pcre_recursion_limit = undef,
$phar_readonly = undef,
$sendmail_path = '/usr/sbin/sendmail -t -i',
$mail_add_x_header = 'On',
$sql_safe_mode = 'Off',
$browscap = undef,
$session_save_handler = 'files',
$session_save_path = '/var/lib/php/session',
$session_use_cookies = '1',
$session_cookie_secure = undef,
$session_use_only_cookies = '1',
$session_name = 'PHPSESSID',
$session_auto_start = '0',
$session_cookie_lifetime = '0',
$session_cookie_path = '/',
$session_cookie_domain = '',
$session_cookie_httponly = '',
$session_serialize_handler = 'php',
$session_gc_probability = '1',
$session_gc_divisor = '1000',
$session_gc_maxlifetime = '1440',
$session_bug_compat_42 = 'Off',
$session_bug_compat_warn = 'Off',
$session_referer_check = '',
$session_entropy_length = '0',
$session_sid_bits_per_character = '6',
$session_sid_length = '48',
$session_hash_function = '0',
$session_hash_bits_per_character = '5',
$url_rewriter_tags = 'a=href,area=href,frame=src,input=src,form=fakeentry',
$soap_wsdl_cache_enabled = '1',
$soap_wsdl_cache_dir = '/tmp',
$soap_wsdl_cache_ttl = '86400',
) {
include '::php::common'
file { $title:
ensure => $ensure,
content => template($template),
}
# Reload FPM if present
if defined(Class['::php::fpm::daemon']) and $::php::fpm::daemon::ensure == 'present' {
File[$title] ~> Service[$php::params::fpm_service_name]
}
}
|