Saltstack Official PHP Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2712 lines
129KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=jinja
  3. {%- set phpng_version = salt['pillar.get']('php:ng:version', '7.0')|string %}
  4. {%- set freebsd_phpng_version = phpng_version.replace('.', '') %}
  5. {%- if salt['grains.get']('os') == "Ubuntu" %}
  6. {%- set use_external_repo = salt['pillar.get']('php:use_external_repo', False) %}
  7. {%- if use_external_repo %}
  8. {%- if salt['grains.get']('osrelease')|string >= '16.04' %}
  9. {%- set php = salt['pillar.get']('php:ng', {
  10. 'lookup': salt['grains.filter_by']({
  11. 'Debian': {
  12. 'pkgs': {
  13. 'adodb': 'libphp-adodb',
  14. 'apache2': 'libapache2-mod-php' + phpng_version,
  15. 'apc': 'php-apcu',
  16. 'apcu': 'php-apcu-bc',
  17. 'bcmath': 'php' + phpng_version + '-bcmath',
  18. 'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev', 'pkg-config', 'libsslcommon2-dev', 'gcc', 'make', 'autoconf', 'libc-dev', 'pkg-config'],
  19. 'cache-lite': 'php-cache-lite',
  20. 'cgi': 'php' + phpng_version + '-cgi',
  21. 'cli': 'php' + phpng_version + '-cli',
  22. 'composer_bin': 'composer',
  23. 'console-table': 'php-console-table',
  24. 'curl': 'php' + phpng_version + '-curl',
  25. 'dev': 'php' + phpng_version + '-dev',
  26. 'ext_conf_path': '/etc/php/' + phpng_version + '/mods-available',
  27. 'fpm': 'php' + phpng_version + '-fpm',
  28. 'gd': 'php' + phpng_version + '-gd',
  29. 'gearman': 'php-gearman',
  30. 'geoip': 'php-geoip',
  31. 'geshi': 'php-geshi',
  32. 'gettext': 'php' + phpng_version,
  33. 'gmp': 'php' + phpng_version + '-gmp',
  34. 'hhvm': 'hhvm',
  35. 'imagick': 'php-imagick',
  36. 'imap': 'php' + phpng_version + '-imap',
  37. 'intl': 'php' + phpng_version + '-intl',
  38. 'json': 'php' + phpng_version + '-json',
  39. 'ldap': 'php' + phpng_version + '-ldap',
  40. 'local_bin': '/usr/local/bin',
  41. 'auth-sasl': 'php-auth-sasl',
  42. 'mail': 'php-mail',
  43. 'mbstring': 'php' + phpng_version + '-mbstring',
  44. 'mcrypt': 'php' + phpng_version + '-mcrypt',
  45. 'memcache': 'php-memcache',
  46. 'memcached': 'php-memcached',
  47. 'mongo': 'php-mongo',
  48. 'mongodb': 'php-mongodb',
  49. 'mysql': 'php' + phpng_version + '-mysql',
  50. 'mysqlnd': 'php' + phpng_version + '-mysql',
  51. 'net-smtp': 'php-net-smtp',
  52. 'net4': 'php-net-ipv4',
  53. 'net6': 'php-net-ipv6',
  54. 'oauth': 'php-oauth',
  55. 'opcache': 'php' + phpng_version + '-opcache',
  56. 'pear': 'php-pear',
  57. 'pgsql': 'php' + phpng_version + '-pgsql',
  58. 'php': 'php' + phpng_version,
  59. 'phpenmod_command': 'phpenmod -v' + phpng_version,
  60. 'pspell': 'php' + phpng_version + '-pspell',
  61. 'redis': 'php' + phpng_version + '-redis',
  62. 'seclib': ['php-phpseclib', 'php-seclib'],
  63. 'snmp': 'php' + phpng_version + '-snmp',
  64. 'soap': 'php' + phpng_version + '-soap',
  65. 'ssh2': 'php-ssh2',
  66. 'sqlite': 'php' + phpng_version + '-sqlite3',
  67. 'suhosin5_ext': 'suhosin.so',
  68. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  69. 'suhosin7_ext': 'suhosin7.so',
  70. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  71. 'sybase': 'php' + phpng_version + '-sybase',
  72. 'tcpdf': 'php-tcpdf',
  73. 'temp_dir': '/tmp',
  74. 'tidy': 'php' + phpng_version + '-tidy',
  75. 'xdebug': 'php' + phpng_version + '-xdebug',
  76. 'xml': 'php' + phpng_version + '-xml',
  77. 'xsl': 'php' + phpng_version + '-xsl',
  78. 'zip': 'php' + phpng_version + '-zip',
  79. },
  80. 'fpm': {
  81. 'conf': '/etc/php/' + phpng_version + '/fpm/php-fpm.conf',
  82. 'ini': '/etc/php/' + phpng_version + '/fpm/php.ini',
  83. 'pools': '/etc/php/' + phpng_version + '/fpm/pool.d',
  84. 'service': 'php' + phpng_version + '-fpm',
  85. 'defaults': odict([
  86. ('global', odict([
  87. ('pid', '/var/run/php' + phpng_version + '-fpm.pid'),
  88. ('error_log', '/var/log/php' + phpng_version + '-fpm.log'),
  89. ])),
  90. ('include', '/etc/php/' + phpng_version + '/fpm/pool.d/*.conf'),
  91. ]),
  92. },
  93. 'hhvm': {
  94. 'conf': '/etc/hhvm/server.ini',
  95. 'ini': '/etc/hhvm/php.ini',
  96. 'service': 'hhvm',
  97. 'defaults': {},
  98. 'server': odict([
  99. ('pid', '/var/run/hhvm/pid'),
  100. ('hhvm.server.port', '9000'),
  101. ('hhvm.server.type', 'fastcgi'),
  102. ('hhvm.server.default_document', 'index.php'),
  103. ('hhvm.log.use_log_file', 'true'),
  104. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  105. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  106. ]),
  107. 'php': odict([
  108. ('session.save_handler', 'files'),
  109. ('session.save_path', '/var/lib/hhvm/sessions'),
  110. ('session.gc_maxlifetime', '1440'),
  111. ('hhvm.log.level', 'Warning'),
  112. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  113. ('hhvm.log.runtime_error_reporting_level', '8191'),
  114. ('hhvm.mysql.typed_results', 'false'),
  115. ]),
  116. },
  117. 'cli': {
  118. 'ini': '/etc/php/' + phpng_version + '/cli/php.ini',
  119. },
  120. 'apache2': {
  121. 'ini': '/etc/php/' + phpng_version + '/apache2/php.ini',
  122. },
  123. },
  124. }),
  125. 'fpm': {
  126. 'service': {
  127. 'enabled': True,
  128. 'opts': {},
  129. },
  130. 'config': {
  131. 'ini': {
  132. 'opts': {},
  133. 'settings': {},
  134. },
  135. 'conf': {
  136. 'opts': {},
  137. 'settings': {},
  138. },
  139. },
  140. 'pools': {},
  141. },
  142. 'hhvm': {
  143. 'service': {
  144. 'enabled': True,
  145. 'opts': {},
  146. },
  147. 'config': {
  148. 'server': {
  149. 'opts': {},
  150. 'settings': {},
  151. },
  152. 'php': {
  153. 'opts': {},
  154. 'settings': {},
  155. },
  156. },
  157. },
  158. 'cli': {
  159. 'ini': {
  160. 'opts': {},
  161. 'settings': {},
  162. }
  163. },
  164. 'apache2': {
  165. 'ini': {
  166. 'opts': {},
  167. 'settings': {},
  168. }
  169. },
  170. 'ini': {
  171. 'defaults': {
  172. 'PHP': {
  173. 'allow_url_fopen': 'On',
  174. 'allow_url_include': 'Off',
  175. 'asp_tags': 'Off',
  176. 'auto_globals_jit': 'On',
  177. 'default_mimetype': '"text/html"',
  178. 'default_socket_timeout': 60,
  179. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  180. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  181. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  182. 'display_errors': 'Off',
  183. 'display_startup_errors': 'Off',
  184. 'enable_dl': 'Off',
  185. 'engine': 'On',
  186. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  187. 'expose_php': 'On',
  188. 'file_uploads': 'On',
  189. 'html_errors': 'On',
  190. 'ignore_repeated_errors': 'Off',
  191. 'ignore_repeated_source': 'Off',
  192. 'implicit_flush': 'Off',
  193. 'log_errors': 'On',
  194. 'log_errors_max_len': 1024,
  195. 'max_execution_time': 30,
  196. 'max_file_uploads': 20,
  197. 'max_input_nesting_level': 64,
  198. 'max_input_time': 60,
  199. 'max_input_vars': 1000,
  200. 'memory_limit': '128M',
  201. 'output_buffering': 4096,
  202. 'post_max_size': '8M',
  203. 'precision': 14,
  204. 'register_argc_argv': 'Off',
  205. 'report_memleaks': 'On',
  206. 'request_order': 'GP',
  207. 'serialize_precision': 17,
  208. 'short_open_tag': 'Off',
  209. 'track_errors': 'Off',
  210. 'upload_max_filesize': '2M',
  211. 'variables_order': 'GPCS',
  212. 'zend.enable_gc': 'On',
  213. 'zlib.output_compression': 'Off',
  214. },
  215. 'CLI Server': {
  216. 'cli_server.color': 'On'
  217. },
  218. 'Date': {
  219. 'date.timezone': 'America/New_York'
  220. },
  221. 'Pdo_mysql': {
  222. 'pdo_mysql.cache_size': 2000
  223. },
  224. 'mail function': {
  225. 'SMTP': 'localhost',
  226. 'mail.add_x_header': 'On'
  227. },
  228. 'SQL': {
  229. 'sql.safe_mode': 'Off'
  230. },
  231. 'ODBC': {
  232. 'odbc.allow_persistent': 'On',
  233. 'odbc.check_persistent': 'On',
  234. 'odbc.max_persistent': '-1',
  235. 'odbc.max_links': '-1',
  236. 'odbc.defaultlrl': 4096,
  237. 'odbc.defaultbinmode': 1
  238. },
  239. 'Interbase': {
  240. 'ibase.allow_persistent': 1,
  241. 'ibase.max_persistent': -1,
  242. 'ibase.max_links': -1,
  243. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  244. 'ibase.dateformat': '"%Y-%m-%d"',
  245. 'ibase.timeformat': '"%H:%M:%S"'
  246. },
  247. 'MySQL': {
  248. 'mysql.allow_local_infile': 'On',
  249. 'mysql.allow_persistent': 'On',
  250. 'mysql.cache_size': '2000',
  251. 'mysql.max_persistent': -1,
  252. 'mysql.max_links': -1,
  253. 'mysql.connect_timeout': 60,
  254. 'mysql.trace_mode': 'Off'
  255. },
  256. 'MySQLi': {
  257. 'mysqli.max_persistent': -1,
  258. 'mysqli.allow_persistent': 'On',
  259. 'mysqli.max_links': -1,
  260. 'mysqli.cache_size': 2000,
  261. 'mysqli.default_port': 3306,
  262. 'mysqli.reconnect': 'Off'
  263. },
  264. 'mysqlnd': {
  265. 'mysqlnd.collect_statistics': 'On',
  266. 'mysqlnd.collect_memory_statistics': 'Off'
  267. },
  268. 'PostgreSQL': {
  269. 'pgsql.allow_persistent': 'On',
  270. 'pgsql.auto_reset_persistent': 'Off',
  271. 'pgsql.max_persistent': -1,
  272. 'pgsql.max_links': -1,
  273. 'pgsql.ignore_notice': 0,
  274. 'pgsql.log_notice': 0
  275. },
  276. 'Sybase-CT': {
  277. 'sybct.allow_persistent': 'On',
  278. 'sybct.max_persistent': -1,
  279. 'sybct.max_links': -1,
  280. 'sybct.min_server_severity': 10,
  281. 'sybct.min_client_severity': 10
  282. },
  283. 'bcmath': {
  284. 'bcmath.scale': 0
  285. },
  286. 'Session': {
  287. 'session.save_handler': 'files',
  288. 'session.use_strict_mode': 0,
  289. 'session.use_cookies': 1,
  290. 'session.use_only_cookies': 1,
  291. 'session.name': 'PHPSESSID',
  292. 'session.auto_start': 0,
  293. 'session.cookie_lifetime': 0,
  294. 'session.cookie_path': '/',
  295. 'session.serialize_handler': 'php',
  296. 'session.gc_probability': 0,
  297. 'session.gc_divisor': 1000,
  298. 'session.gc_maxlifetime': 1440,
  299. 'session.bug_compat_42': 'Off',
  300. 'session.bug_compat_warn': 'Off',
  301. 'session.cache_limiter': 'nocache',
  302. 'session.cache_expire': '180',
  303. 'session.use_trans_sid': 0,
  304. 'session.hash_function': 0,
  305. 'session.hash_bits_per_character': 5,
  306. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  307. },
  308. 'MSSQL': {
  309. 'mssql.allow_persistent': 'On',
  310. 'mssql.max_persistent': -1,
  311. 'mssql.max_links': -1,
  312. 'mssql.min_error_severity': 10,
  313. 'mssql.min_message_severity': 10,
  314. 'mssql.compatibility_mode': 'Off',
  315. 'mssql.secure_connection': 'Off'
  316. },
  317. 'Tidy': {
  318. 'tidy.clean_output': 'Off'
  319. },
  320. 'soap': {
  321. 'soap.wsdl_cache_enabled': 1,
  322. 'soap.wsdl_cache_dir': '"/tmp"',
  323. 'soap.wsdl_cache_ttl': 86400,
  324. 'soap.wsdl_cache_limit': 5
  325. },
  326. 'ldap': {
  327. 'ldap.max_links': -1
  328. },
  329. },
  330. },
  331. }, merge=True) %}
  332. {%- else %}
  333. {%- set php = salt['pillar.get']('php:ng', {
  334. 'lookup': salt['grains.filter_by']({
  335. 'Debian': {
  336. 'pkgs': {
  337. 'adodb': 'libphp-adodb',
  338. 'apache2': 'libapache2-mod-php' + phpng_version,
  339. 'apc': 'php-apcu',
  340. 'apcu': 'php-apcu-bc',
  341. 'bcmath': 'php' + phpng_version + '-bcmath',
  342. 'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev', 'gcc', 'make', 'autoconf', 'libc-dev', 'pkg-config'],
  343. 'cache-lite': 'php-cache-lite',
  344. 'cgi': 'php' + phpng_version + '-cgi',
  345. 'cli': 'php' + phpng_version + '-cli',
  346. 'composer_bin': 'composer',
  347. 'console-table': 'php-console-table',
  348. 'curl': 'php' + phpng_version + '-curl',
  349. 'dev': 'php' + phpng_version + '-dev',
  350. 'ext_conf_path': '/etc/php/' + phpng_version + '/mods-available',
  351. 'fpm': 'php' + phpng_version + '-fpm',
  352. 'gd': 'php' + phpng_version + '-gd',
  353. 'gearman': 'php-gearman',
  354. 'geoip': 'php-geoip',
  355. 'geshi': 'php-geshi',
  356. 'gettext': 'php' + phpng_version,
  357. 'gmp': 'php' + phpng_version + '-gmp',
  358. 'hhvm': 'hhvm',
  359. 'imagick': 'php-imagick',
  360. 'imap': 'php' + phpng_version + '-imap',
  361. 'intl': 'php' + phpng_version + '-intl',
  362. 'json': 'php' + phpng_version + '-json',
  363. 'ldap': 'php' + phpng_version + '-ldap',
  364. 'local_bin': '/usr/local/bin',
  365. 'auth-sasl': 'php-auth-sasl',
  366. 'mail': 'php-mail',
  367. 'mbstring': 'php' + phpng_version + '-mbstring',
  368. 'mcrypt': 'php' + phpng_version + '-mcrypt',
  369. 'memcache': 'php-memcache',
  370. 'memcached': 'php-memcached',
  371. 'mongo': 'php-mongo',
  372. 'mongodb': 'php-mongodb',
  373. 'mysql': 'php' + phpng_version + '-mysql',
  374. 'mysqlnd': 'php' + phpng_version + '-mysql',
  375. 'net-smtp': 'php-net-smtp',
  376. 'net4': 'php-net-ipv4',
  377. 'net6': 'php-net-ipv6',
  378. 'oauth': 'php-oauth',
  379. 'opcache': 'php' + phpng_version + '-opcache',
  380. 'pear': 'php-pear',
  381. 'pgsql': 'php' + phpng_version + '-pgsql',
  382. 'php': 'php' + phpng_version,
  383. 'phpenmod_command': 'phpenmod -v' + phpng_version,
  384. 'pspell': 'php' + phpng_version + '-pspell',
  385. 'readline': 'php' + phpng_version + '-readline',
  386. 'redis': 'php' + phpng_version + '-redis',
  387. 'seclib': 'php-seclib',
  388. 'snmp': 'php' + phpng_version + '-snmp',
  389. 'soap': 'php' + phpng_version + '-soap',
  390. 'ssh2': 'php-ssh2',
  391. 'sqlite': 'php' + phpng_version + '-sqlite3',
  392. 'suhosin5_ext': 'suhosin.so',
  393. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  394. 'suhosin7_ext': 'suhosin7.so',
  395. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  396. 'sybase': 'php' + phpng_version + '-sybase',
  397. 'tcpdf': 'php-tcpdf',
  398. 'temp_dir': '/tmp',
  399. 'tidy': 'php' + phpng_version + '-tidy',
  400. 'xdebug': 'php' + phpng_version + '-xdebug',
  401. 'xml': 'php' + phpng_version + '-xml',
  402. 'xsl': 'php' + phpng_version + '-xsl',
  403. 'zip': 'php' + phpng_version + '-zip',
  404. },
  405. 'fpm': {
  406. 'conf': '/etc/php/' + phpng_version + '/fpm/php-fpm.conf',
  407. 'ini': '/etc/php/' + phpng_version + '/fpm/php.ini',
  408. 'pools': '/etc/php/' + phpng_version + '/fpm/pool.d',
  409. 'service': 'php' + phpng_version + '-fpm',
  410. 'defaults': odict([
  411. ('global', odict([
  412. ('pid', '/var/run/php' + phpng_version + '-fpm.pid'),
  413. ('error_log', '/var/log/php' + phpng_version + '-fpm.log'),
  414. ])),
  415. ('include', '/etc/php/' + phpng_version + '/fpm/pool.d/*.conf'),
  416. ]),
  417. },
  418. 'hhvm': {
  419. 'conf': '/etc/hhvm/server.ini',
  420. 'ini': '/etc/hhvm/php.ini',
  421. 'service': 'hhvm',
  422. 'defaults': {},
  423. 'server': odict([
  424. ('pid', '/var/run/hhvm/pid'),
  425. ('hhvm.server.port', '9000'),
  426. ('hhvm.server.type', 'fastcgi'),
  427. ('hhvm.server.default_document', 'index.php'),
  428. ('hhvm.log.use_log_file', 'true'),
  429. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  430. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  431. ]),
  432. 'php': odict([
  433. ('session.save_handler', 'files'),
  434. ('session.save_path', '/var/lib/hhvm/sessions'),
  435. ('session.gc_maxlifetime', '1440'),
  436. ('hhvm.log.level', 'Warning'),
  437. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  438. ('hhvm.log.runtime_error_reporting_level', '8191'),
  439. ('hhvm.mysql.typed_results', 'false'),
  440. ]),
  441. },
  442. 'cli': {
  443. 'ini': '/etc/php/' + phpng_version + '/cli/php.ini',
  444. },
  445. 'apache2': {
  446. 'ini': '/etc/php/' + phpng_version + '/apache2/php.ini',
  447. },
  448. },
  449. }),
  450. 'fpm': {
  451. 'service': {
  452. 'enabled': True,
  453. 'opts': {},
  454. },
  455. 'config': {
  456. 'ini': {
  457. 'opts': {},
  458. 'settings': {},
  459. },
  460. 'conf': {
  461. 'opts': {},
  462. 'settings': {},
  463. },
  464. },
  465. 'pools': {},
  466. },
  467. 'hhvm': {
  468. 'service': {
  469. 'enabled': True,
  470. 'opts': {},
  471. },
  472. 'config': {
  473. 'server': {
  474. 'opts': {},
  475. 'settings': {},
  476. },
  477. 'php': {
  478. 'opts': {},
  479. 'settings': {},
  480. },
  481. },
  482. },
  483. 'cli': {
  484. 'ini': {
  485. 'opts': {},
  486. 'settings': {},
  487. }
  488. },
  489. 'apache2': {
  490. 'ini': {
  491. 'opts': {},
  492. 'settings': {},
  493. }
  494. },
  495. 'ini': {
  496. 'defaults': {
  497. 'PHP': {
  498. 'allow_url_fopen': 'On',
  499. 'allow_url_include': 'Off',
  500. 'asp_tags': 'Off',
  501. 'auto_globals_jit': 'On',
  502. 'default_mimetype': '"text/html"',
  503. 'default_socket_timeout': 60,
  504. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  505. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  506. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  507. 'display_errors': 'Off',
  508. 'display_startup_errors': 'Off',
  509. 'enable_dl': 'Off',
  510. 'engine': 'On',
  511. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  512. 'expose_php': 'On',
  513. 'file_uploads': 'On',
  514. 'html_errors': 'On',
  515. 'ignore_repeated_errors': 'Off',
  516. 'ignore_repeated_source': 'Off',
  517. 'implicit_flush': 'Off',
  518. 'log_errors': 'On',
  519. 'log_errors_max_len': 1024,
  520. 'max_execution_time': 30,
  521. 'max_file_uploads': 20,
  522. 'max_input_nesting_level': 64,
  523. 'max_input_time': 60,
  524. 'max_input_vars': 1000,
  525. 'memory_limit': '128M',
  526. 'output_buffering': 4096,
  527. 'post_max_size': '8M',
  528. 'precision': 14,
  529. 'register_argc_argv': 'Off',
  530. 'report_memleaks': 'On',
  531. 'request_order': 'GP',
  532. 'serialize_precision': 17,
  533. 'short_open_tag': 'Off',
  534. 'track_errors': 'Off',
  535. 'upload_max_filesize': '2M',
  536. 'variables_order': 'GPCS',
  537. 'zend.enable_gc': 'On',
  538. 'zlib.output_compression': 'Off',
  539. },
  540. 'CLI Server': {
  541. 'cli_server.color': 'On'
  542. },
  543. 'Date': {
  544. 'date.timezone': 'America/New_York'
  545. },
  546. 'Pdo_mysql': {
  547. 'pdo_mysql.cache_size': 2000
  548. },
  549. 'mail function': {
  550. 'SMTP': 'localhost',
  551. 'mail.add_x_header': 'On'
  552. },
  553. 'SQL': {
  554. 'sql.safe_mode': 'Off'
  555. },
  556. 'ODBC': {
  557. 'odbc.allow_persistent': 'On',
  558. 'odbc.check_persistent': 'On',
  559. 'odbc.max_persistent': '-1',
  560. 'odbc.max_links': '-1',
  561. 'odbc.defaultlrl': 4096,
  562. 'odbc.defaultbinmode': 1
  563. },
  564. 'Interbase': {
  565. 'ibase.allow_persistent': 1,
  566. 'ibase.max_persistent': -1,
  567. 'ibase.max_links': -1,
  568. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  569. 'ibase.dateformat': '"%Y-%m-%d"',
  570. 'ibase.timeformat': '"%H:%M:%S"'
  571. },
  572. 'MySQL': {
  573. 'mysql.allow_local_infile': 'On',
  574. 'mysql.allow_persistent': 'On',
  575. 'mysql.cache_size': '2000',
  576. 'mysql.max_persistent': -1,
  577. 'mysql.max_links': -1,
  578. 'mysql.connect_timeout': 60,
  579. 'mysql.trace_mode': 'Off'
  580. },
  581. 'MySQLi': {
  582. 'mysqli.max_persistent': -1,
  583. 'mysqli.allow_persistent': 'On',
  584. 'mysqli.max_links': -1,
  585. 'mysqli.cache_size': 2000,
  586. 'mysqli.default_port': 3306,
  587. 'mysqli.reconnect': 'Off'
  588. },
  589. 'mysqlnd': {
  590. 'mysqlnd.collect_statistics': 'On',
  591. 'mysqlnd.collect_memory_statistics': 'Off'
  592. },
  593. 'PostgreSQL': {
  594. 'pgsql.allow_persistent': 'On',
  595. 'pgsql.auto_reset_persistent': 'Off',
  596. 'pgsql.max_persistent': -1,
  597. 'pgsql.max_links': -1,
  598. 'pgsql.ignore_notice': 0,
  599. 'pgsql.log_notice': 0
  600. },
  601. 'Sybase-CT': {
  602. 'sybct.allow_persistent': 'On',
  603. 'sybct.max_persistent': -1,
  604. 'sybct.max_links': -1,
  605. 'sybct.min_server_severity': 10,
  606. 'sybct.min_client_severity': 10
  607. },
  608. 'bcmath': {
  609. 'bcmath.scale': 0
  610. },
  611. 'Session': {
  612. 'session.save_handler': 'files',
  613. 'session.use_strict_mode': 0,
  614. 'session.use_cookies': 1,
  615. 'session.use_only_cookies': 1,
  616. 'session.name': 'PHPSESSID',
  617. 'session.auto_start': 0,
  618. 'session.cookie_lifetime': 0,
  619. 'session.cookie_path': '/',
  620. 'session.serialize_handler': 'php',
  621. 'session.gc_probability': 0,
  622. 'session.gc_divisor': 1000,
  623. 'session.gc_maxlifetime': 1440,
  624. 'session.bug_compat_42': 'Off',
  625. 'session.bug_compat_warn': 'Off',
  626. 'session.cache_limiter': 'nocache',
  627. 'session.cache_expire': '180',
  628. 'session.use_trans_sid': 0,
  629. 'session.hash_function': 0,
  630. 'session.hash_bits_per_character': 5,
  631. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  632. },
  633. 'MSSQL': {
  634. 'mssql.allow_persistent': 'On',
  635. 'mssql.max_persistent': -1,
  636. 'mssql.max_links': -1,
  637. 'mssql.min_error_severity': 10,
  638. 'mssql.min_message_severity': 10,
  639. 'mssql.compatibility_mode': 'Off',
  640. 'mssql.secure_connection': 'Off'
  641. },
  642. 'Tidy': {
  643. 'tidy.clean_output': 'Off'
  644. },
  645. 'soap': {
  646. 'soap.wsdl_cache_enabled': 1,
  647. 'soap.wsdl_cache_dir': '"/tmp"',
  648. 'soap.wsdl_cache_ttl': 86400,
  649. 'soap.wsdl_cache_limit': 5
  650. },
  651. 'ldap': {
  652. 'ldap.max_links': -1
  653. },
  654. },
  655. },
  656. }, merge=True) %}
  657. {%- endif %}
  658. {%- else %}
  659. {%- if salt['grains.get']('osrelease')|string >= '17.10' %}
  660. {%- set php = salt['pillar.get']('php:ng', {
  661. 'lookup': salt['grains.filter_by']({
  662. 'Ubuntu': {
  663. 'pkgs': {
  664. 'adodb': 'libphp-adodb',
  665. 'apache2': 'libapache2-mod-php',
  666. 'apc': 'php',
  667. 'apcu': 'php-apcu',
  668. 'bcmath': 'php7.1-bcmath',
  669. 'cache-lite': 'php-cache-lite',
  670. 'cgi': 'php-cgi',
  671. 'cli': 'php-cli',
  672. 'console-table': 'php-console-table',
  673. 'composer_bin': 'composer',
  674. 'curl': 'php-curl',
  675. 'dev': 'php7.1-dev',
  676. 'fpm': 'php-fpm',
  677. 'gd': 'php-gd',
  678. 'geoip': 'php-geoip',
  679. 'geshi': 'php-geshi',
  680. 'gmp': 'php-gmp',
  681. 'hhvm': 'hhvm',
  682. 'imagick': 'php-imagick',
  683. 'imap': 'php-imap',
  684. 'intl': 'php-intl',
  685. 'json': 'php-json',
  686. 'ldap': 'php-ldap',
  687. 'local_bin': '/usr/local/bin',
  688. 'auth-sasl': 'php-auth-sasl',
  689. 'mail': 'php-mail',
  690. 'mbstring': 'php-mbstring',
  691. 'mcrypt': 'php-mcrypt',
  692. 'memcache': 'php-memcache',
  693. 'memcached': 'php-memcached',
  694. 'mongodb': 'php-mongodb',
  695. 'mysql': 'php-mysql',
  696. 'mysqlnd': 'php',
  697. 'net-smtp': 'php-net-smtp',
  698. 'net4': 'php-net-ipv4',
  699. 'net6': 'php-net-ipv6',
  700. 'oauth': 'php-oauth',
  701. 'opcache': 'php7.1-opcache',
  702. 'pear': 'php-pear',
  703. 'pgsql': 'php-pgsql',
  704. 'php': 'php',
  705. 'phpenmod_command': 'phpenmod',
  706. 'pspell': 'php-pspell',
  707. 'redis': 'php-redis',
  708. 'seclib': ['php-phpseclib', 'php-seclib'],
  709. 'snmp': 'php-snmp',
  710. 'soap': 'php-soap',
  711. 'sqlite': 'php-sqlite3',
  712. 'ssh2': 'php-ssh2',
  713. 'suhosin': 'php',
  714. 'sybase': 'php-sybase',
  715. 'tcpdf': 'php-tcpdf',
  716. 'temp_dir': '/tmp',
  717. 'tidy': 'php7.1-tidy',
  718. 'xcache': 'php',
  719. 'xdebug': 'php-xdebug',
  720. 'xml': 'php-xml',
  721. 'xsl': 'php7.1-xsl',
  722. 'zip': 'php-zip',
  723. },
  724. 'fpm': {
  725. 'conf': '/etc/php/7.1/fpm/php-fpm.conf',
  726. 'ini': '/etc/php/7.1/fpm/php.ini',
  727. 'pools': '/etc/php/7.1/fpm/pool.d',
  728. 'service': 'php7.1-fpm',
  729. 'defaults': odict([
  730. ('global', odict([
  731. ('pid', '/var/run/php7.1-fpm.pid'),
  732. ('error_log', '/var/log/php7.1-fpm.log'),
  733. ])),
  734. ('include', '/etc/php/7.1/fpm/pool.d/*.conf'),
  735. ]),
  736. },
  737. 'hhvm': {
  738. 'conf': '/etc/hhvm/server.ini',
  739. 'ini': '/etc/hhvm/php.ini',
  740. 'service': 'hhvm',
  741. 'defaults': {},
  742. 'server': odict([
  743. ('pid', '/var/run/hhvm/pid'),
  744. ('hhvm.server.port', '9000'),
  745. ('hhvm.server.type', 'fastcgi'),
  746. ('hhvm.server.default_document', 'index.php'),
  747. ('hhvm.log.use_log_file', 'true'),
  748. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  749. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  750. ]),
  751. 'php': odict([
  752. ('session.save_handler', 'files'),
  753. ('session.save_path', '/var/lib/hhvm/sessions'),
  754. ('session.gc_maxlifetime', '1440'),
  755. ('hhvm.log.level', 'Warning'),
  756. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  757. ('hhvm.log.runtime_error_reporting_level', '8191'),
  758. ('hhvm.mysql.typed_results', 'false'),
  759. ]),
  760. },
  761. 'cli': {
  762. 'ini': '/etc/php/7.1/cli/php.ini',
  763. },
  764. 'apache2': {
  765. 'ini': '/etc/php/7.1/apache2/php.ini',
  766. },
  767. 'xcache': {
  768. 'ini': '/etc/php/7.1/mods-available/xcache.ini',
  769. 'defaults': {},
  770. },
  771. },
  772. }, grain="os"),
  773. 'fpm': {
  774. 'service': {
  775. 'enabled': True,
  776. 'opts': {},
  777. },
  778. 'config': {
  779. 'ini': {
  780. 'opts': {},
  781. 'settings': {},
  782. },
  783. 'conf': {
  784. 'opts': {},
  785. 'settings': {},
  786. },
  787. },
  788. 'pools': {
  789. 'default.conf': {
  790. 'enabled': False,
  791. 'opts': {},
  792. },
  793. },
  794. },
  795. 'hhvm': {
  796. 'service': {
  797. 'enabled': True,
  798. 'opts': {},
  799. },
  800. 'config': {
  801. 'server': {
  802. 'opts': {},
  803. 'settings': {},
  804. },
  805. 'php': {
  806. 'opts': {},
  807. 'settings': {},
  808. },
  809. },
  810. },
  811. 'cli': {
  812. 'ini': {
  813. 'opts': {},
  814. 'settings': {},
  815. }
  816. },
  817. 'apache2': {
  818. 'ini': {
  819. 'opts': {},
  820. 'settings': {},
  821. }
  822. },
  823. 'xcache': {
  824. 'ini': {
  825. 'defaults': {
  826. 'xcache-common': {
  827. 'extension': 'xcache.so',
  828. },
  829. 'xcache.admin': {
  830. 'xcache.admin.enable_auth': 'On',
  831. },
  832. 'xcache': {
  833. 'xcache.shm_scheme': '"mmap"',
  834. 'xcache.size': '60M',
  835. 'xcache.count': '1',
  836. 'xcache.slots': '8K',
  837. 'xcache.ttl': '0',
  838. 'xcache.gc_interval': '0',
  839. 'xcache.var_size': '4M',
  840. 'xcache.var_count': '1',
  841. 'xcache.var_slots': '8K',
  842. 'xcache.var_ttl': '0',
  843. 'xcache.var_maxttl': '0',
  844. 'xcache.var_gc_interval': '300',
  845. 'xcache.var_namespace_mode': '0',
  846. 'xcache.var_namespace': '""',
  847. 'xcache.readonly_protection': 'Off',
  848. 'xcache.mmap_path': '"/dev/zero"',
  849. 'xcache.coredump_directory': '""',
  850. 'xcache.coredump_type': '0',
  851. 'xcache.disable_on_crash': 'Off',
  852. 'xcache.experimental': 'Off',
  853. 'xcache.cacher': 'On',
  854. 'xcache.stat': 'On',
  855. 'xcache.optimizer': 'Off',
  856. },
  857. 'xcache.coverager': {
  858. 'xcache.coverager': 'Off',
  859. 'xcache.coverager_autostart': 'On',
  860. 'xcache.coveragedump_directory': '""',
  861. },
  862. },
  863. 'opts': {},
  864. 'settings': {},
  865. }
  866. },
  867. 'ini': {
  868. 'defaults': {
  869. 'PHP': {
  870. 'allow_url_fopen': 'On',
  871. 'allow_url_include': 'Off',
  872. 'asp_tags': 'Off',
  873. 'auto_globals_jit': 'On',
  874. 'default_mimetype': '"text/html"',
  875. 'default_socket_timeout': 60,
  876. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  877. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  878. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  879. 'display_errors': 'Off',
  880. 'display_startup_errors': 'Off',
  881. 'enable_dl': 'Off',
  882. 'engine': 'On',
  883. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  884. 'expose_php': 'On',
  885. 'file_uploads': 'On',
  886. 'html_errors': 'On',
  887. 'ignore_repeated_errors': 'Off',
  888. 'ignore_repeated_source': 'Off',
  889. 'implicit_flush': 'Off',
  890. 'log_errors': 'On',
  891. 'log_errors_max_len': 1024,
  892. 'max_execution_time': 30,
  893. 'max_file_uploads': 20,
  894. 'max_input_nesting_level': 64,
  895. 'max_input_time': 60,
  896. 'max_input_vars': 1000,
  897. 'memory_limit': '128M',
  898. 'output_buffering': 4096,
  899. 'post_max_size': '8M',
  900. 'precision': 14,
  901. 'register_argc_argv': 'Off',
  902. 'report_memleaks': 'On',
  903. 'request_order': 'GP',
  904. 'serialize_precision': 17,
  905. 'short_open_tag': 'Off',
  906. 'track_errors': 'Off',
  907. 'upload_max_filesize': '2M',
  908. 'variables_order': 'GPCS',
  909. 'zend.enable_gc': 'On',
  910. 'zlib.output_compression': 'Off',
  911. },
  912. 'CLI Server': {
  913. 'cli_server.color': 'On'
  914. },
  915. 'Date': {
  916. 'date.timezone': 'America/New_York'
  917. },
  918. 'Pdo_mysql': {
  919. 'pdo_mysql.cache_size': 2000
  920. },
  921. 'mail function': {
  922. 'SMTP': 'localhost',
  923. 'mail.add_x_header': 'On'
  924. },
  925. 'SQL': {
  926. 'sql.safe_mode': 'Off'
  927. },
  928. 'ODBC': {
  929. 'odbc.allow_persistent': 'On',
  930. 'odbc.check_persistent': 'On',
  931. 'odbc.max_persistent': '-1',
  932. 'odbc.max_links': '-1',
  933. 'odbc.defaultlrl': 4096,
  934. 'odbc.defaultbinmode': 1
  935. },
  936. 'Interbase': {
  937. 'ibase.allow_persistent': 1,
  938. 'ibase.max_persistent': -1,
  939. 'ibase.max_links': -1,
  940. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  941. 'ibase.dateformat': '"%Y-%m-%d"',
  942. 'ibase.timeformat': '"%H:%M:%S"'
  943. },
  944. 'MySQL': {
  945. 'mysql.allow_local_infile': 'On',
  946. 'mysql.allow_persistent': 'On',
  947. 'mysql.cache_size': '2000',
  948. 'mysql.max_persistent': -1,
  949. 'mysql.max_links': -1,
  950. 'mysql.connect_timeout': 60,
  951. 'mysql.trace_mode': 'Off'
  952. },
  953. 'MySQLi': {
  954. 'mysqli.max_persistent': -1,
  955. 'mysqli.allow_persistent': 'On',
  956. 'mysqli.max_links': -1,
  957. 'mysqli.cache_size': 2000,
  958. 'mysqli.default_port': 3306,
  959. 'mysqli.reconnect': 'Off'
  960. },
  961. 'mysqlnd': {
  962. 'mysqlnd.collect_statistics': 'On',
  963. 'mysqlnd.collect_memory_statistics': 'Off'
  964. },
  965. 'PostgreSQL': {
  966. 'pgsql.allow_persistent': 'On',
  967. 'pgsql.auto_reset_persistent': 'Off',
  968. 'pgsql.max_persistent': -1,
  969. 'pgsql.max_links': -1,
  970. 'pgsql.ignore_notice': 0,
  971. 'pgsql.log_notice': 0
  972. },
  973. 'Sybase-CT': {
  974. 'sybct.allow_persistent': 'On',
  975. 'sybct.max_persistent': -1,
  976. 'sybct.max_links': -1,
  977. 'sybct.min_server_severity': 10,
  978. 'sybct.min_client_severity': 10
  979. },
  980. 'bcmath': {
  981. 'bcmath.scale': 0
  982. },
  983. 'Session': {
  984. 'session.save_handler': 'files',
  985. 'session.use_strict_mode': 0,
  986. 'session.use_cookies': 1,
  987. 'session.use_only_cookies': 1,
  988. 'session.name': 'PHPSESSID',
  989. 'session.auto_start': 0,
  990. 'session.cookie_lifetime': 0,
  991. 'session.cookie_path': '/',
  992. 'session.serialize_handler': 'php',
  993. 'session.gc_probability': 0,
  994. 'session.gc_divisor': 1000,
  995. 'session.gc_maxlifetime': 1440,
  996. 'session.bug_compat_42': 'Off',
  997. 'session.bug_compat_warn': 'Off',
  998. 'session.cache_limiter': 'nocache',
  999. 'session.cache_expire': '180',
  1000. 'session.use_trans_sid': 0,
  1001. 'session.hash_function': 0,
  1002. 'session.hash_bits_per_character': 5,
  1003. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  1004. },
  1005. 'MSSQL': {
  1006. 'mssql.allow_persistent': 'On',
  1007. 'mssql.max_persistent': -1,
  1008. 'mssql.max_links': -1,
  1009. 'mssql.min_error_severity': 10,
  1010. 'mssql.min_message_severity': 10,
  1011. 'mssql.compatibility_mode': 'Off',
  1012. 'mssql.secure_connection': 'Off'
  1013. },
  1014. 'Tidy': {
  1015. 'tidy.clean_output': 'Off'
  1016. },
  1017. 'soap': {
  1018. 'soap.wsdl_cache_enabled': 1,
  1019. 'soap.wsdl_cache_dir': '"/tmp"',
  1020. 'soap.wsdl_cache_ttl': 86400,
  1021. 'soap.wsdl_cache_limit': 5
  1022. },
  1023. 'ldap': {
  1024. 'ldap.max_links': -1
  1025. },
  1026. },
  1027. },
  1028. }, merge=True) %}
  1029. {%- elif salt['grains.get']('osrelease')|string >= '16.04' %}
  1030. {%- set php = salt['pillar.get']('php:ng', {
  1031. 'lookup': salt['grains.filter_by']({
  1032. 'Ubuntu': {
  1033. 'pkgs': {
  1034. 'adodb': 'libphp-adodb',
  1035. 'apache2': 'libapache2-mod-php',
  1036. 'apc': 'php',
  1037. 'apcu': 'php-apcu',
  1038. 'bcmath': 'php7.0-bcmath',
  1039. 'cache-lite': 'php-cache-lite',
  1040. 'cgi': 'php-cgi',
  1041. 'cli': 'php-cli',
  1042. 'console-table': 'php-console-table',
  1043. 'composer_bin': 'composer',
  1044. 'curl': 'php-curl',
  1045. 'dev': 'php7.0-dev',
  1046. 'fpm': 'php-fpm',
  1047. 'gd': 'php-gd',
  1048. 'geoip': 'php-geoip',
  1049. 'geshi': 'php-geshi',
  1050. 'gmp': 'php-gmp',
  1051. 'hhvm': 'hhvm',
  1052. 'imagick': 'php-imagick',
  1053. 'imap': 'php-imap',
  1054. 'intl': 'php-intl',
  1055. 'json': 'php-json',
  1056. 'ldap': 'php-ldap',
  1057. 'local_bin': '/usr/local/bin',
  1058. 'auth-sasl': 'php-auth-sasl',
  1059. 'mail': 'php-mail',
  1060. 'mbstring': 'php-mbstring',
  1061. 'mcrypt': 'php-mcrypt',
  1062. 'memcache': 'php-memcache',
  1063. 'memcached': 'php-memcached',
  1064. 'mongodb': 'php-mongodb',
  1065. 'mysql': 'php-mysql',
  1066. 'mysqlnd': 'php',
  1067. 'net-smtp': 'php-net-smtp',
  1068. 'net4': 'php-net-ipv4',
  1069. 'net6': 'php-net-ipv6',
  1070. 'oauth': 'php-oauth',
  1071. 'opcache': 'php7.0-opcache',
  1072. 'pear': 'php-pear',
  1073. 'pgsql': 'php-pgsql',
  1074. 'php': 'php',
  1075. 'phpenmod_command': 'phpenmod',
  1076. 'pspell': 'php-pspell',
  1077. 'redis': 'php-redis',
  1078. 'seclib': ['php-phpseclib', 'php-seclib'],
  1079. 'snmp': 'php-snmp',
  1080. 'soap': 'php-soap',
  1081. 'sqlite': 'php-sqlite3',
  1082. 'ssh2': 'php-ssh2',
  1083. 'suhosin': 'php',
  1084. 'sybase': 'php-sybase',
  1085. 'tcpdf': 'php-tcpdf',
  1086. 'temp_dir': '/tmp',
  1087. 'tidy': 'php7.0-tidy',
  1088. 'xcache': 'php',
  1089. 'xdebug': 'php-xdebug',
  1090. 'xml': 'php-xml',
  1091. 'xsl': 'php7.0-xsl',
  1092. 'zip': 'php-zip',
  1093. },
  1094. 'fpm': {
  1095. 'conf': '/etc/php/7.0/fpm/php-fpm.conf',
  1096. 'ini': '/etc/php/7.0/fpm/php.ini',
  1097. 'pools': '/etc/php/7.0/fpm/pool.d',
  1098. 'service': 'php7.0-fpm',
  1099. 'defaults': odict([
  1100. ('global', odict([
  1101. ('pid', '/var/run/php7.0-fpm.pid'),
  1102. ('error_log', '/var/log/php7.0-fpm.log'),
  1103. ])),
  1104. ('include', '/etc/php/7.0/fpm/pool.d/*.conf'),
  1105. ]),
  1106. },
  1107. 'hhvm': {
  1108. 'conf': '/etc/hhvm/server.ini',
  1109. 'ini': '/etc/hhvm/php.ini',
  1110. 'service': 'hhvm',
  1111. 'defaults': {},
  1112. 'server': odict([
  1113. ('pid', '/var/run/hhvm/pid'),
  1114. ('hhvm.server.port', '9000'),
  1115. ('hhvm.server.type', 'fastcgi'),
  1116. ('hhvm.server.default_document', 'index.php'),
  1117. ('hhvm.log.use_log_file', 'true'),
  1118. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  1119. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  1120. ]),
  1121. 'php': odict([
  1122. ('session.save_handler', 'files'),
  1123. ('session.save_path', '/var/lib/hhvm/sessions'),
  1124. ('session.gc_maxlifetime', '1440'),
  1125. ('hhvm.log.level', 'Warning'),
  1126. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  1127. ('hhvm.log.runtime_error_reporting_level', '8191'),
  1128. ('hhvm.mysql.typed_results', 'false'),
  1129. ]),
  1130. },
  1131. 'cli': {
  1132. 'ini': '/etc/php/7.0/cli/php.ini',
  1133. },
  1134. 'apache2': {
  1135. 'ini': '/etc/php/7.0/apache2/php.ini',
  1136. },
  1137. 'xcache': {
  1138. 'ini': '/etc/php/7.0/mods-available/xcache.ini',
  1139. 'defaults': {},
  1140. },
  1141. },
  1142. }, grain="os"),
  1143. 'fpm': {
  1144. 'service': {
  1145. 'enabled': True,
  1146. 'opts': {},
  1147. },
  1148. 'config': {
  1149. 'ini': {
  1150. 'opts': {},
  1151. 'settings': {},
  1152. },
  1153. 'conf': {
  1154. 'opts': {},
  1155. 'settings': {},
  1156. },
  1157. },
  1158. 'pools': {
  1159. 'default.conf': {
  1160. 'enabled': False,
  1161. 'opts': {},
  1162. },
  1163. },
  1164. },
  1165. 'hhvm': {
  1166. 'service': {
  1167. 'enabled': True,
  1168. 'opts': {},
  1169. },
  1170. 'config': {
  1171. 'server': {
  1172. 'opts': {},
  1173. 'settings': {},
  1174. },
  1175. 'php': {
  1176. 'opts': {},
  1177. 'settings': {},
  1178. },
  1179. },
  1180. },
  1181. 'cli': {
  1182. 'ini': {
  1183. 'opts': {},
  1184. 'settings': {},
  1185. }
  1186. },
  1187. 'apache2': {
  1188. 'ini': {
  1189. 'opts': {},
  1190. 'settings': {},
  1191. }
  1192. },
  1193. 'xcache': {
  1194. 'ini': {
  1195. 'defaults': {
  1196. 'xcache-common': {
  1197. 'extension': 'xcache.so',
  1198. },
  1199. 'xcache.admin': {
  1200. 'xcache.admin.enable_auth': 'On',
  1201. },
  1202. 'xcache': {
  1203. 'xcache.shm_scheme': '"mmap"',
  1204. 'xcache.size': '60M',
  1205. 'xcache.count': '1',
  1206. 'xcache.slots': '8K',
  1207. 'xcache.ttl': '0',
  1208. 'xcache.gc_interval': '0',
  1209. 'xcache.var_size': '4M',
  1210. 'xcache.var_count': '1',
  1211. 'xcache.var_slots': '8K',
  1212. 'xcache.var_ttl': '0',
  1213. 'xcache.var_maxttl': '0',
  1214. 'xcache.var_gc_interval': '300',
  1215. 'xcache.var_namespace_mode': '0',
  1216. 'xcache.var_namespace': '""',
  1217. 'xcache.readonly_protection': 'Off',
  1218. 'xcache.mmap_path': '"/dev/zero"',
  1219. 'xcache.coredump_directory': '""',
  1220. 'xcache.coredump_type': '0',
  1221. 'xcache.disable_on_crash': 'Off',
  1222. 'xcache.experimental': 'Off',
  1223. 'xcache.cacher': 'On',
  1224. 'xcache.stat': 'On',
  1225. 'xcache.optimizer': 'Off',
  1226. },
  1227. 'xcache.coverager': {
  1228. 'xcache.coverager': 'Off',
  1229. 'xcache.coverager_autostart': 'On',
  1230. 'xcache.coveragedump_directory': '""',
  1231. },
  1232. },
  1233. 'opts': {},
  1234. 'settings': {},
  1235. }
  1236. },
  1237. 'ini': {
  1238. 'defaults': {
  1239. 'PHP': {
  1240. 'allow_url_fopen': 'On',
  1241. 'allow_url_include': 'Off',
  1242. 'asp_tags': 'Off',
  1243. 'auto_globals_jit': 'On',
  1244. 'default_mimetype': '"text/html"',
  1245. 'default_socket_timeout': 60,
  1246. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  1247. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  1248. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  1249. 'display_errors': 'Off',
  1250. 'display_startup_errors': 'Off',
  1251. 'enable_dl': 'Off',
  1252. 'engine': 'On',
  1253. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  1254. 'expose_php': 'On',
  1255. 'file_uploads': 'On',
  1256. 'html_errors': 'On',
  1257. 'ignore_repeated_errors': 'Off',
  1258. 'ignore_repeated_source': 'Off',
  1259. 'implicit_flush': 'Off',
  1260. 'log_errors': 'On',
  1261. 'log_errors_max_len': 1024,
  1262. 'max_execution_time': 30,
  1263. 'max_file_uploads': 20,
  1264. 'max_input_nesting_level': 64,
  1265. 'max_input_time': 60,
  1266. 'max_input_vars': 1000,
  1267. 'memory_limit': '128M',
  1268. 'output_buffering': 4096,
  1269. 'post_max_size': '8M',
  1270. 'precision': 14,
  1271. 'register_argc_argv': 'Off',
  1272. 'report_memleaks': 'On',
  1273. 'request_order': 'GP',
  1274. 'serialize_precision': 17,
  1275. 'short_open_tag': 'Off',
  1276. 'track_errors': 'Off',
  1277. 'upload_max_filesize': '2M',
  1278. 'variables_order': 'GPCS',
  1279. 'zend.enable_gc': 'On',
  1280. 'zlib.output_compression': 'Off',
  1281. },
  1282. 'CLI Server': {
  1283. 'cli_server.color': 'On'
  1284. },
  1285. 'Date': {
  1286. 'date.timezone': 'America/New_York'
  1287. },
  1288. 'Pdo_mysql': {
  1289. 'pdo_mysql.cache_size': 2000
  1290. },
  1291. 'mail function': {
  1292. 'SMTP': 'localhost',
  1293. 'mail.add_x_header': 'On'
  1294. },
  1295. 'SQL': {
  1296. 'sql.safe_mode': 'Off'
  1297. },
  1298. 'ODBC': {
  1299. 'odbc.allow_persistent': 'On',
  1300. 'odbc.check_persistent': 'On',
  1301. 'odbc.max_persistent': '-1',
  1302. 'odbc.max_links': '-1',
  1303. 'odbc.defaultlrl': 4096,
  1304. 'odbc.defaultbinmode': 1
  1305. },
  1306. 'Interbase': {
  1307. 'ibase.allow_persistent': 1,
  1308. 'ibase.max_persistent': -1,
  1309. 'ibase.max_links': -1,
  1310. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  1311. 'ibase.dateformat': '"%Y-%m-%d"',
  1312. 'ibase.timeformat': '"%H:%M:%S"'
  1313. },
  1314. 'MySQL': {
  1315. 'mysql.allow_local_infile': 'On',
  1316. 'mysql.allow_persistent': 'On',
  1317. 'mysql.cache_size': '2000',
  1318. 'mysql.max_persistent': -1,
  1319. 'mysql.max_links': -1,
  1320. 'mysql.connect_timeout': 60,
  1321. 'mysql.trace_mode': 'Off'
  1322. },
  1323. 'MySQLi': {
  1324. 'mysqli.max_persistent': -1,
  1325. 'mysqli.allow_persistent': 'On',
  1326. 'mysqli.max_links': -1,
  1327. 'mysqli.cache_size': 2000,
  1328. 'mysqli.default_port': 3306,
  1329. 'mysqli.reconnect': 'Off'
  1330. },
  1331. 'mysqlnd': {
  1332. 'mysqlnd.collect_statistics': 'On',
  1333. 'mysqlnd.collect_memory_statistics': 'Off'
  1334. },
  1335. 'PostgreSQL': {
  1336. 'pgsql.allow_persistent': 'On',
  1337. 'pgsql.auto_reset_persistent': 'Off',
  1338. 'pgsql.max_persistent': -1,
  1339. 'pgsql.max_links': -1,
  1340. 'pgsql.ignore_notice': 0,
  1341. 'pgsql.log_notice': 0
  1342. },
  1343. 'Sybase-CT': {
  1344. 'sybct.allow_persistent': 'On',
  1345. 'sybct.max_persistent': -1,
  1346. 'sybct.max_links': -1,
  1347. 'sybct.min_server_severity': 10,
  1348. 'sybct.min_client_severity': 10
  1349. },
  1350. 'bcmath': {
  1351. 'bcmath.scale': 0
  1352. },
  1353. 'Session': {
  1354. 'session.save_handler': 'files',
  1355. 'session.use_strict_mode': 0,
  1356. 'session.use_cookies': 1,
  1357. 'session.use_only_cookies': 1,
  1358. 'session.name': 'PHPSESSID',
  1359. 'session.auto_start': 0,
  1360. 'session.cookie_lifetime': 0,
  1361. 'session.cookie_path': '/',
  1362. 'session.serialize_handler': 'php',
  1363. 'session.gc_probability': 0,
  1364. 'session.gc_divisor': 1000,
  1365. 'session.gc_maxlifetime': 1440,
  1366. 'session.bug_compat_42': 'Off',
  1367. 'session.bug_compat_warn': 'Off',
  1368. 'session.cache_limiter': 'nocache',
  1369. 'session.cache_expire': '180',
  1370. 'session.use_trans_sid': 0,
  1371. 'session.hash_function': 0,
  1372. 'session.hash_bits_per_character': 5,
  1373. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  1374. },
  1375. 'MSSQL': {
  1376. 'mssql.allow_persistent': 'On',
  1377. 'mssql.max_persistent': -1,
  1378. 'mssql.max_links': -1,
  1379. 'mssql.min_error_severity': 10,
  1380. 'mssql.min_message_severity': 10,
  1381. 'mssql.compatibility_mode': 'Off',
  1382. 'mssql.secure_connection': 'Off'
  1383. },
  1384. 'Tidy': {
  1385. 'tidy.clean_output': 'Off'
  1386. },
  1387. 'soap': {
  1388. 'soap.wsdl_cache_enabled': 1,
  1389. 'soap.wsdl_cache_dir': '"/tmp"',
  1390. 'soap.wsdl_cache_ttl': 86400,
  1391. 'soap.wsdl_cache_limit': 5
  1392. },
  1393. 'ldap': {
  1394. 'ldap.max_links': -1
  1395. },
  1396. },
  1397. },
  1398. }, merge=True) %}
  1399. {%- else %}
  1400. {%- set php = salt['pillar.get']('php:ng', {
  1401. 'lookup': salt['grains.filter_by']({
  1402. 'Ubuntu': {
  1403. 'pkgs': {
  1404. 'adodb': 'php5-adodb',
  1405. 'apache2': 'libapache2-mod-php5',
  1406. 'apc': 'php-apc',
  1407. 'apcu': 'php5-apcu',
  1408. 'bcmath': 'php5',
  1409. 'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev'],
  1410. 'cache-lite': 'php-cache-lite',
  1411. 'cgi': 'php5-cgi',
  1412. 'cli': 'php5-cli',
  1413. 'composer_bin': 'composer',
  1414. 'console-table': 'php-console-table',
  1415. 'curl': 'php5-curl',
  1416. 'dev': ['php5-dev','build-essential'],
  1417. 'ext_conf_path': salt['grains.filter_by']({
  1418. 'precise': '/etc/php5/conf.d',
  1419. 'default': '/etc/php5/mods-available',
  1420. }, grain='oscodename'),
  1421. 'fpm': 'php5-fpm',
  1422. 'gd': 'php5-gd',
  1423. 'gearman': 'php5-gearman',
  1424. 'geoip': 'php5-geoip',
  1425. 'geshi': 'php-geshi',
  1426. 'gettext': 'php-gettext',
  1427. 'gmp': 'php5-gmp',
  1428. 'hhvm': 'hhvm',
  1429. 'imagick': 'php5-imagick',
  1430. 'imap': 'php5-imap',
  1431. 'intl': 'php5-intl',
  1432. 'json': 'php5-json',
  1433. 'ldap': 'php5-ldap',
  1434. 'local_bin': '/usr/local/bin',
  1435. 'auth-sasl': 'php-auth-sasl',
  1436. 'mail': 'php-mail',
  1437. 'mbstring': 'php5',
  1438. 'mcrypt': 'php5-mcrypt',
  1439. 'mdb2': 'php-mdb2',
  1440. 'mdb2-driver-mysql': 'php-mdb2-driver-mysql',
  1441. 'mdb2-driver-pgsql': 'php-mdb2-driver-pgsql',
  1442. 'memcache': 'php5-memcache',
  1443. 'memcached': 'php5-memcached',
  1444. 'mongodb': salt['grains.filter_by']({
  1445. 'trusty': 'php5-mongo',
  1446. 'default': '',
  1447. }, grain='oscodename'),
  1448. 'mysql': 'php5-mysql',
  1449. 'mysqlnd': 'php5-mysqlnd',
  1450. 'net-smtp': 'php-net-smtp',
  1451. 'net4': 'php-net-ipv4',
  1452. 'net6': 'php-net-ipv6',
  1453. 'oauth': 'php5-oauth',
  1454. 'opcache': 'php5',
  1455. 'pear': 'php-pear',
  1456. 'pgsql': 'php5-pgsql',
  1457. 'php': 'php5',
  1458. 'phpenmod_command': salt['grains.filter_by']({
  1459. 'precise': 'true',
  1460. 'default': 'php5enmod',
  1461. }, grain='oscodename'),
  1462. 'pspell': 'php5-pspell',
  1463. 'redis': 'php5-redis',
  1464. 'seclib': 'php-seclib',
  1465. 'snmp': 'php5-snmp',
  1466. 'soap': 'php-soap',
  1467. 'sqlite': 'php5-sqlite',
  1468. 'ssh2': 'libssh2-php',
  1469. 'suhosin5_ext': 'suhosin.so',
  1470. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  1471. 'suhosin7_ext': 'suhosin7.so',
  1472. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  1473. 'svn': 'php5-svn',
  1474. 'tcpdf': 'php-tcpdf',
  1475. 'tidy': 'php5-tidy',
  1476. 'temp_dir': '/tmp',
  1477. 'xcache': 'php5-xcache',
  1478. 'xdebug': 'php5-xdebug',
  1479. 'xml': 'php5',
  1480. 'xsl': 'php5-xsl',
  1481. 'zip': 'php5',
  1482. },
  1483. 'fpm': {
  1484. 'conf': '/etc/php5/fpm/php-fpm.conf',
  1485. 'ini': '/etc/php5/fpm/php.ini',
  1486. 'pools': '/etc/php5/fpm/pool.d',
  1487. 'service': 'php5-fpm',
  1488. 'defaults': odict([
  1489. ('global', odict([
  1490. ('pid', '/var/run/php5-fpm.pid'),
  1491. ('error_log', '/var/log/php5-fpm.log'),
  1492. ])),
  1493. ('include', '/etc/php5/fpm/pool.d/*.conf'),
  1494. ]),
  1495. },
  1496. 'hhvm': {
  1497. 'conf': '/etc/hhvm/server.ini',
  1498. 'ini': '/etc/hhvm/php.ini',
  1499. 'service': 'hhvm',
  1500. 'defaults': {},
  1501. 'server': odict([
  1502. ('pid', '/var/run/hhvm/pid'),
  1503. ('hhvm.server.port', '9000'),
  1504. ('hhvm.server.type', 'fastcgi'),
  1505. ('hhvm.server.default_document', 'index.php'),
  1506. ('hhvm.log.use_log_file', 'true'),
  1507. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  1508. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  1509. ]),
  1510. 'php': odict([
  1511. ('session.save_handler', 'files'),
  1512. ('session.save_path', '/var/lib/hhvm/sessions'),
  1513. ('session.gc_maxlifetime', '1440'),
  1514. ('hhvm.log.level', 'Warning'),
  1515. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  1516. ('hhvm.log.runtime_error_reporting_level', '8191'),
  1517. ('hhvm.mysql.typed_results', 'false'),
  1518. ]),
  1519. },
  1520. 'cli': {
  1521. 'ini': '/etc/php5/cli/php.ini',
  1522. },
  1523. 'apache2': {
  1524. 'ini': '/etc/php5/apache2/php.ini',
  1525. },
  1526. 'xcache': {
  1527. 'ini': '/etc/php5/mods-available/xcache.ini',
  1528. 'defaults': {},
  1529. },
  1530. },
  1531. }, grain="os"),
  1532. 'fpm': {
  1533. 'service': {
  1534. 'enabled': True,
  1535. 'opts': {},
  1536. },
  1537. 'config': {
  1538. 'ini': {
  1539. 'opts': {},
  1540. 'settings': {},
  1541. },
  1542. 'conf': {
  1543. 'opts': {},
  1544. 'settings': {},
  1545. },
  1546. },
  1547. 'pools': {
  1548. 'default.conf': {
  1549. 'enabled': False,
  1550. 'opts': {},
  1551. },
  1552. },
  1553. },
  1554. 'hhvm': {
  1555. 'service': {
  1556. 'enabled': True,
  1557. 'opts': {},
  1558. },
  1559. 'config': {
  1560. 'server': {
  1561. 'opts': {},
  1562. 'settings': {},
  1563. },
  1564. 'php': {
  1565. 'opts': {},
  1566. 'settings': {},
  1567. },
  1568. },
  1569. },
  1570. 'cli': {
  1571. 'ini': {
  1572. 'opts': {},
  1573. 'settings': {},
  1574. }
  1575. },
  1576. 'apache2': {
  1577. 'ini': {
  1578. 'opts': {},
  1579. 'settings': {},
  1580. }
  1581. },
  1582. 'xcache': {
  1583. 'ini': {
  1584. 'defaults': {
  1585. 'xcache-common': {
  1586. 'extension': 'xcache.so',
  1587. },
  1588. 'xcache.admin': {
  1589. 'xcache.admin.enable_auth': 'On',
  1590. },
  1591. 'xcache': {
  1592. 'xcache.shm_scheme': '"mmap"',
  1593. 'xcache.size': '60M',
  1594. 'xcache.count': '1',
  1595. 'xcache.slots': '8K',
  1596. 'xcache.ttl': '0',
  1597. 'xcache.gc_interval': '0',
  1598. 'xcache.var_size': '4M',
  1599. 'xcache.var_count': '1',
  1600. 'xcache.var_slots': '8K',
  1601. 'xcache.var_ttl': '0',
  1602. 'xcache.var_maxttl': '0',
  1603. 'xcache.var_gc_interval': '300',
  1604. 'xcache.var_namespace_mode': '0',
  1605. 'xcache.var_namespace': '""',
  1606. 'xcache.readonly_protection': 'Off',
  1607. 'xcache.mmap_path': '"/dev/zero"',
  1608. 'xcache.coredump_directory': '""',
  1609. 'xcache.coredump_type': '0',
  1610. 'xcache.disable_on_crash': 'Off',
  1611. 'xcache.experimental': 'Off',
  1612. 'xcache.cacher': 'On',
  1613. 'xcache.stat': 'On',
  1614. 'xcache.optimizer': 'Off',
  1615. },
  1616. 'xcache.coverager': {
  1617. 'xcache.coverager': 'Off',
  1618. 'xcache.coverager_autostart': 'On',
  1619. 'xcache.coveragedump_directory': '""',
  1620. },
  1621. },
  1622. 'opts': {},
  1623. 'settings': {},
  1624. }
  1625. },
  1626. 'ini': {
  1627. 'defaults': {
  1628. 'PHP': {
  1629. 'allow_url_fopen': 'On',
  1630. 'allow_url_include': 'Off',
  1631. 'asp_tags': 'Off',
  1632. 'auto_globals_jit': 'On',
  1633. 'default_mimetype': '"text/html"',
  1634. 'default_socket_timeout': 60,
  1635. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  1636. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  1637. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  1638. 'display_errors': 'Off',
  1639. 'display_startup_errors': 'Off',
  1640. 'enable_dl': 'Off',
  1641. 'engine': 'On',
  1642. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  1643. 'expose_php': 'On',
  1644. 'file_uploads': 'On',
  1645. 'html_errors': 'On',
  1646. 'ignore_repeated_errors': 'Off',
  1647. 'ignore_repeated_source': 'Off',
  1648. 'implicit_flush': 'Off',
  1649. 'log_errors': 'On',
  1650. 'log_errors_max_len': 1024,
  1651. 'max_execution_time': 30,
  1652. 'max_file_uploads': 20,
  1653. 'max_input_nesting_level': 64,
  1654. 'max_input_time': 60,
  1655. 'max_input_vars': 1000,
  1656. 'memory_limit': '128M',
  1657. 'output_buffering': 4096,
  1658. 'post_max_size': '8M',
  1659. 'precision': 14,
  1660. 'register_argc_argv': 'Off',
  1661. 'report_memleaks': 'On',
  1662. 'request_order': 'GP',
  1663. 'serialize_precision': 17,
  1664. 'short_open_tag': 'Off',
  1665. 'track_errors': 'Off',
  1666. 'upload_max_filesize': '2M',
  1667. 'variables_order': 'GPCS',
  1668. 'zend.enable_gc': 'On',
  1669. 'zlib.output_compression': 'Off',
  1670. },
  1671. 'CLI Server': {
  1672. 'cli_server.color': 'On'
  1673. },
  1674. 'Date': {
  1675. 'date.timezone': 'America/New_York'
  1676. },
  1677. 'Pdo_mysql': {
  1678. 'pdo_mysql.cache_size': 2000
  1679. },
  1680. 'mail function': {
  1681. 'SMTP': 'localhost',
  1682. 'mail.add_x_header': 'On'
  1683. },
  1684. 'SQL': {
  1685. 'sql.safe_mode': 'Off'
  1686. },
  1687. 'ODBC': {
  1688. 'odbc.allow_persistent': 'On',
  1689. 'odbc.check_persistent': 'On',
  1690. 'odbc.max_persistent': '-1',
  1691. 'odbc.max_links': '-1',
  1692. 'odbc.defaultlrl': 4096,
  1693. 'odbc.defaultbinmode': 1
  1694. },
  1695. 'Interbase': {
  1696. 'ibase.allow_persistent': 1,
  1697. 'ibase.max_persistent': -1,
  1698. 'ibase.max_links': -1,
  1699. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  1700. 'ibase.dateformat': '"%Y-%m-%d"',
  1701. 'ibase.timeformat': '"%H:%M:%S"'
  1702. },
  1703. 'MySQL': {
  1704. 'mysql.allow_local_infile': 'On',
  1705. 'mysql.allow_persistent': 'On',
  1706. 'mysql.cache_size': '2000',
  1707. 'mysql.max_persistent': -1,
  1708. 'mysql.max_links': -1,
  1709. 'mysql.connect_timeout': 60,
  1710. 'mysql.trace_mode': 'Off'
  1711. },
  1712. 'MySQLi': {
  1713. 'mysqli.max_persistent': -1,
  1714. 'mysqli.allow_persistent': 'On',
  1715. 'mysqli.max_links': -1,
  1716. 'mysqli.cache_size': 2000,
  1717. 'mysqli.default_port': 3306,
  1718. 'mysqli.reconnect': 'Off'
  1719. },
  1720. 'mysqlnd': {
  1721. 'mysqlnd.collect_statistics': 'On',
  1722. 'mysqlnd.collect_memory_statistics': 'Off'
  1723. },
  1724. 'PostgreSQL': {
  1725. 'pgsql.allow_persistent': 'On',
  1726. 'pgsql.auto_reset_persistent': 'Off',
  1727. 'pgsql.max_persistent': -1,
  1728. 'pgsql.max_links': -1,
  1729. 'pgsql.ignore_notice': 0,
  1730. 'pgsql.log_notice': 0
  1731. },
  1732. 'Sybase-CT': {
  1733. 'sybct.allow_persistent': 'On',
  1734. 'sybct.max_persistent': -1,
  1735. 'sybct.max_links': -1,
  1736. 'sybct.min_server_severity': 10,
  1737. 'sybct.min_client_severity': 10
  1738. },
  1739. 'bcmath': {
  1740. 'bcmath.scale': 0
  1741. },
  1742. 'Session': {
  1743. 'session.save_handler': 'files',
  1744. 'session.use_strict_mode': 0,
  1745. 'session.use_cookies': 1,
  1746. 'session.use_only_cookies': 1,
  1747. 'session.name': 'PHPSESSID',
  1748. 'session.auto_start': 0,
  1749. 'session.cookie_lifetime': 0,
  1750. 'session.cookie_path': '/',
  1751. 'session.serialize_handler': 'php',
  1752. 'session.gc_probability': 0,
  1753. 'session.gc_divisor': 1000,
  1754. 'session.gc_maxlifetime': 1440,
  1755. 'session.bug_compat_42': 'Off',
  1756. 'session.bug_compat_warn': 'Off',
  1757. 'session.cache_limiter': 'nocache',
  1758. 'session.cache_expire': '180',
  1759. 'session.use_trans_sid': 0,
  1760. 'session.hash_function': 0,
  1761. 'session.hash_bits_per_character': 5,
  1762. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  1763. },
  1764. 'MSSQL': {
  1765. 'mssql.allow_persistent': 'On',
  1766. 'mssql.max_persistent': -1,
  1767. 'mssql.max_links': -1,
  1768. 'mssql.min_error_severity': 10,
  1769. 'mssql.min_message_severity': 10,
  1770. 'mssql.compatibility_mode': 'Off',
  1771. 'mssql.secure_connection': 'Off'
  1772. },
  1773. 'Tidy': {
  1774. 'tidy.clean_output': 'Off'
  1775. },
  1776. 'soap': {
  1777. 'soap.wsdl_cache_enabled': 1,
  1778. 'soap.wsdl_cache_dir': '"/tmp"',
  1779. 'soap.wsdl_cache_ttl': 86400,
  1780. 'soap.wsdl_cache_limit': 5
  1781. },
  1782. 'ldap': {
  1783. 'ldap.max_links': -1
  1784. },
  1785. },
  1786. },
  1787. }, merge=True) %}
  1788. {%- endif %}
  1789. {%- endif %}
  1790. {%- elif salt['grains.get']('os') == "Debian" %}
  1791. {%- if phpng_version|string == '5' %}
  1792. {%- set confdir = '/etc/php5' %}
  1793. {%- else %}
  1794. {%- set confdir = '/etc/php/' + phpng_version %}
  1795. {%- endif %}
  1796. {%- set php = salt['pillar.get']('php:ng', {
  1797. 'lookup': salt['grains.filter_by']({
  1798. 'Debian': {
  1799. 'pkgs': {
  1800. 'adodb': 'libphp-adodb',
  1801. 'apache2': 'libapache2-mod-php' + phpng_version,
  1802. 'apc': 'php-apcu',
  1803. 'apcu': 'php-apcu-bc',
  1804. 'bcmath': 'php' + phpng_version + '-bcmath',
  1805. 'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev', 'pkg-config', 'libsslcommon2-dev', 'gcc', 'make', 'autoconf', 'libc-dev', 'pkg-config'],
  1806. 'cache-lite': 'php-cache-lite',
  1807. 'cgi': 'php' + phpng_version + '-cgi',
  1808. 'cli': 'php' + phpng_version + '-cli',
  1809. 'composer_bin': 'composer',
  1810. 'console-table': 'php-console-table',
  1811. 'curl': 'php' + phpng_version + '-curl',
  1812. 'dev': 'php' + phpng_version + '-dev',
  1813. 'ext_conf_path': '/etc/php/' + phpng_version + '/mods-available',
  1814. 'fpm': 'php' + phpng_version + '-fpm',
  1815. 'gd': 'php' + phpng_version + '-gd',
  1816. 'gearman': 'php-gearman',
  1817. 'geoip': 'php-geoip',
  1818. 'geshi': 'php-geshi',
  1819. 'gettext': 'php' + phpng_version,
  1820. 'gmp': 'php' + phpng_version + '-gmp',
  1821. 'hhvm': 'hhvm',
  1822. 'imagick': 'php-imagick',
  1823. 'imap': 'php' + phpng_version + '-imap',
  1824. 'intl': 'php' + phpng_version + '-intl',
  1825. 'json': 'php' + phpng_version + '-json',
  1826. 'ldap': 'php' + phpng_version + '-ldap',
  1827. 'local_bin': '/usr/local/bin',
  1828. 'auth-sasl': 'php-auth-sasl',
  1829. 'mail': 'php-mail',
  1830. 'mbstring': 'php' + phpng_version + '-mbstring',
  1831. 'mcrypt': 'php' + phpng_version + '-mcrypt',
  1832. 'memcache': 'php-memcache',
  1833. 'memcached': 'php-memcached',
  1834. 'mongo': 'php-mongo',
  1835. 'mongodb': 'php-mongodb',
  1836. 'mysql': 'php' + phpng_version + '-mysql',
  1837. 'mysqlnd': 'php' + phpng_version + '-mysql',
  1838. 'net-smtp': 'php-net-smtp',
  1839. 'net4': 'php-net-ipv4',
  1840. 'net6': 'php-net-ipv6',
  1841. 'oauth': 'php-oauth',
  1842. 'opcache': 'php' + phpng_version + '-opcache',
  1843. 'pear': 'php-pear',
  1844. 'pgsql': 'php' + phpng_version + '-pgsql',
  1845. 'php': 'php' + phpng_version,
  1846. 'phpenmod_command': 'phpenmod -v' + phpng_version,
  1847. 'pspell': 'php' + phpng_version + '-pspell',
  1848. 'redis': 'php-redis',
  1849. 'seclib': ['php-phpseclib', 'php-seclib'],
  1850. 'snmp': 'php' + phpng_version + '-snmp',
  1851. 'soap': 'php' + phpng_version + '-soap',
  1852. 'ssh2': 'php-ssh2',
  1853. 'sqlite': 'php' + phpng_version + '-sqlite3',
  1854. 'suhosin5_ext': 'suhosin.so',
  1855. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  1856. 'suhosin7_ext': 'suhosin7.so',
  1857. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  1858. 'sybase': 'php' + phpng_version + '-sybase',
  1859. 'tcpdf': 'php-tcpdf',
  1860. 'temp_dir': '/tmp',
  1861. 'tidy': 'php' + phpng_version + '-tidy',
  1862. 'xdebug': 'php' + phpng_version + '-xdebug',
  1863. 'xml': 'php' + phpng_version + '-xml',
  1864. 'xsl': 'php' + phpng_version + '-xsl',
  1865. 'zip': 'php' + phpng_version + '-zip',
  1866. },
  1867. 'fpm': {
  1868. 'conf': confdir + '/fpm/php-fpm.conf',
  1869. 'ini': confdir + '/fpm/php.ini',
  1870. 'pools': confdir + '/fpm/pool.d',
  1871. 'service': 'php' + phpng_version + '-fpm',
  1872. 'defaults': odict([
  1873. ('global', odict([
  1874. ('pid', '/var/run/php' + phpng_version + '-fpm.pid'),
  1875. ('error_log', '/var/log/php' + phpng_version + '-fpm.log'),
  1876. ])),
  1877. ('include', confdir + '/fpm/pool.d/*.conf'),
  1878. ]),
  1879. },
  1880. 'hhvm': {
  1881. 'conf': '/etc/hhvm/server.ini',
  1882. 'ini': '/etc/hhvm/php.ini',
  1883. 'service': 'hhvm',
  1884. 'defaults': {},
  1885. 'server': odict([
  1886. ('pid', '/var/run/hhvm/pid'),
  1887. ('hhvm.server.port', '9000'),
  1888. ('hhvm.server.type', 'fastcgi'),
  1889. ('hhvm.server.default_document', 'index.php'),
  1890. ('hhvm.log.use_log_file', 'true'),
  1891. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  1892. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  1893. ]),
  1894. 'php': odict([
  1895. ('session.save_handler', 'files'),
  1896. ('session.save_path', '/var/lib/hhvm/sessions'),
  1897. ('session.gc_maxlifetime', '1440'),
  1898. ('hhvm.log.level', 'Warning'),
  1899. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  1900. ('hhvm.log.runtime_error_reporting_level', '8191'),
  1901. ('hhvm.mysql.typed_results', 'false'),
  1902. ]),
  1903. },
  1904. 'cli': {
  1905. 'ini': confdir + '/cli/php.ini',
  1906. },
  1907. 'apache2': {
  1908. 'ini': confdir + '/apache2/php.ini',
  1909. },
  1910. },
  1911. }),
  1912. 'fpm': {
  1913. 'service': {
  1914. 'enabled': True,
  1915. 'opts': {},
  1916. },
  1917. 'config': {
  1918. 'ini': {
  1919. 'opts': {},
  1920. 'settings': {},
  1921. },
  1922. 'conf': {
  1923. 'opts': {},
  1924. 'settings': {},
  1925. },
  1926. },
  1927. 'pools': {},
  1928. },
  1929. 'hhvm': {
  1930. 'service': {
  1931. 'enabled': True,
  1932. 'opts': {},
  1933. },
  1934. 'config': {
  1935. 'server': {
  1936. 'opts': {},
  1937. 'settings': {},
  1938. },
  1939. 'php': {
  1940. 'opts': {},
  1941. 'settings': {},
  1942. },
  1943. },
  1944. },
  1945. 'cli': {
  1946. 'ini': {
  1947. 'opts': {},
  1948. 'settings': {},
  1949. }
  1950. },
  1951. 'apache2': {
  1952. 'ini': {
  1953. 'opts': {},
  1954. 'settings': {},
  1955. }
  1956. },
  1957. 'ini': {
  1958. 'defaults': {
  1959. 'PHP': {
  1960. 'allow_url_fopen': 'On',
  1961. 'allow_url_include': 'Off',
  1962. 'asp_tags': 'Off',
  1963. 'auto_globals_jit': 'On',
  1964. 'default_mimetype': '"text/html"',
  1965. 'default_socket_timeout': 60,
  1966. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  1967. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  1968. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  1969. 'display_errors': 'Off',
  1970. 'display_startup_errors': 'Off',
  1971. 'enable_dl': 'Off',
  1972. 'engine': 'On',
  1973. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  1974. 'expose_php': 'On',
  1975. 'file_uploads': 'On',
  1976. 'html_errors': 'On',
  1977. 'ignore_repeated_errors': 'Off',
  1978. 'ignore_repeated_source': 'Off',
  1979. 'implicit_flush': 'Off',
  1980. 'log_errors': 'On',
  1981. 'log_errors_max_len': 1024,
  1982. 'max_execution_time': 30,
  1983. 'max_file_uploads': 20,
  1984. 'max_input_nesting_level': 64,
  1985. 'max_input_time': 60,
  1986. 'max_input_vars': 1000,
  1987. 'memory_limit': '128M',
  1988. 'output_buffering': 4096,
  1989. 'post_max_size': '8M',
  1990. 'precision': 14,
  1991. 'register_argc_argv': 'Off',
  1992. 'report_memleaks': 'On',
  1993. 'request_order': 'GP',
  1994. 'serialize_precision': 17,
  1995. 'short_open_tag': 'Off',
  1996. 'track_errors': 'Off',
  1997. 'upload_max_filesize': '2M',
  1998. 'variables_order': 'GPCS',
  1999. 'zend.enable_gc': 'On',
  2000. 'zlib.output_compression': 'Off',
  2001. },
  2002. 'CLI Server': {
  2003. 'cli_server.color': 'On'
  2004. },
  2005. 'Date': {
  2006. 'date.timezone': 'America/New_York'
  2007. },
  2008. 'Pdo_mysql': {
  2009. 'pdo_mysql.cache_size': 2000
  2010. },
  2011. 'mail function': {
  2012. 'SMTP': 'localhost',
  2013. 'mail.add_x_header': 'On'
  2014. },
  2015. 'SQL': {
  2016. 'sql.safe_mode': 'Off'
  2017. },
  2018. 'ODBC': {
  2019. 'odbc.allow_persistent': 'On',
  2020. 'odbc.check_persistent': 'On',
  2021. 'odbc.max_persistent': '-1',
  2022. 'odbc.max_links': '-1',
  2023. 'odbc.defaultlrl': 4096,
  2024. 'odbc.defaultbinmode': 1
  2025. },
  2026. 'Interbase': {
  2027. 'ibase.allow_persistent': 1,
  2028. 'ibase.max_persistent': -1,
  2029. 'ibase.max_links': -1,
  2030. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  2031. 'ibase.dateformat': '"%Y-%m-%d"',
  2032. 'ibase.timeformat': '"%H:%M:%S"'
  2033. },
  2034. 'MySQL': {
  2035. 'mysql.allow_local_infile': 'On',
  2036. 'mysql.allow_persistent': 'On',
  2037. 'mysql.cache_size': '2000',
  2038. 'mysql.max_persistent': -1,
  2039. 'mysql.max_links': -1,
  2040. 'mysql.connect_timeout': 60,
  2041. 'mysql.trace_mode': 'Off'
  2042. },
  2043. 'MySQLi': {
  2044. 'mysqli.max_persistent': -1,
  2045. 'mysqli.allow_persistent': 'On',
  2046. 'mysqli.max_links': -1,
  2047. 'mysqli.cache_size': 2000,
  2048. 'mysqli.default_port': 3306,
  2049. 'mysqli.reconnect': 'Off'
  2050. },
  2051. 'mysqlnd': {
  2052. 'mysqlnd.collect_statistics': 'On',
  2053. 'mysqlnd.collect_memory_statistics': 'Off'
  2054. },
  2055. 'PostgreSQL': {
  2056. 'pgsql.allow_persistent': 'On',
  2057. 'pgsql.auto_reset_persistent': 'Off',
  2058. 'pgsql.max_persistent': -1,
  2059. 'pgsql.max_links': -1,
  2060. 'pgsql.ignore_notice': 0,
  2061. 'pgsql.log_notice': 0
  2062. },
  2063. 'Sybase-CT': {
  2064. 'sybct.allow_persistent': 'On',
  2065. 'sybct.max_persistent': -1,
  2066. 'sybct.max_links': -1,
  2067. 'sybct.min_server_severity': 10,
  2068. 'sybct.min_client_severity': 10
  2069. },
  2070. 'bcmath': {
  2071. 'bcmath.scale': 0
  2072. },
  2073. 'Session': {
  2074. 'session.save_handler': 'files',
  2075. 'session.use_strict_mode': 0,
  2076. 'session.use_cookies': 1,
  2077. 'session.use_only_cookies': 1,
  2078. 'session.name': 'PHPSESSID',
  2079. 'session.auto_start': 0,
  2080. 'session.cookie_lifetime': 0,
  2081. 'session.cookie_path': '/',
  2082. 'session.serialize_handler': 'php',
  2083. 'session.gc_probability': 0,
  2084. 'session.gc_divisor': 1000,
  2085. 'session.gc_maxlifetime': 1440,
  2086. 'session.bug_compat_42': 'Off',
  2087. 'session.bug_compat_warn': 'Off',
  2088. 'session.cache_limiter': 'nocache',
  2089. 'session.cache_expire': '180',
  2090. 'session.use_trans_sid': 0,
  2091. 'session.hash_function': 0,
  2092. 'session.hash_bits_per_character': 5,
  2093. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  2094. },
  2095. 'MSSQL': {
  2096. 'mssql.allow_persistent': 'On',
  2097. 'mssql.max_persistent': -1,
  2098. 'mssql.max_links': -1,
  2099. 'mssql.min_error_severity': 10,
  2100. 'mssql.min_message_severity': 10,
  2101. 'mssql.compatibility_mode': 'Off',
  2102. 'mssql.secure_connection': 'Off'
  2103. },
  2104. 'Tidy': {
  2105. 'tidy.clean_output': 'Off'
  2106. },
  2107. 'soap': {
  2108. 'soap.wsdl_cache_enabled': 1,
  2109. 'soap.wsdl_cache_dir': '"/tmp"',
  2110. 'soap.wsdl_cache_ttl': 86400,
  2111. 'soap.wsdl_cache_limit': 5
  2112. },
  2113. 'ldap': {
  2114. 'ldap.max_links': -1
  2115. },
  2116. },
  2117. },
  2118. }, merge=True) %}
  2119. {%- else %}
  2120. {%- set php = salt['pillar.get']('php:ng', {
  2121. 'lookup': salt['grains.filter_by']({
  2122. 'Debian': {
  2123. 'pkgs': {
  2124. 'adodb': 'php5-adodb',
  2125. 'apache2': 'libapache2-mod-php5',
  2126. 'apc': 'php-apc',
  2127. 'apcu': 'php5-apcu',
  2128. 'bcmath': 'php5',
  2129. 'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev'],
  2130. 'cache-lite': 'php-cache-lite',
  2131. 'cgi': 'php5-cgi',
  2132. 'cli': 'php5-cli',
  2133. 'console-table': 'php-console-table',
  2134. 'composer_bin': 'composer',
  2135. 'curl': 'php5-curl',
  2136. 'dev': ['php5-dev','build-essential'],
  2137. 'ext_conf_path': '/etc/php5/mods-available',
  2138. 'fpm': 'php5-fpm',
  2139. 'gd': 'php5-gd',
  2140. 'gearman': 'php5-gearman',
  2141. 'geoip': 'php5-geoip',
  2142. 'geshi': 'php-geshi',
  2143. 'gettext': 'php-gettext',
  2144. 'gmp': 'php5-gmp',
  2145. 'hhvm': 'hhvm',
  2146. 'imagick': 'php5-imagick',
  2147. 'imap': 'php5-imap',
  2148. 'intl': 'php5-intl',
  2149. 'json': 'php5-json',
  2150. 'ldap': 'php5-ldap',
  2151. 'local_bin': '/usr/local/bin',
  2152. 'auth-sasl': 'php-auth-sasl',
  2153. 'mail': 'php-mail',
  2154. 'mbstring': 'php5',
  2155. 'mcrypt': 'php5-mcrypt',
  2156. 'mdb2': 'php-mdb2',
  2157. 'mdb2-driver-mysql': 'php-mdb2-driver-mysql',
  2158. 'mdb2-driver-pgsql': 'php-mdb2-driver-pgsql',
  2159. 'memcache': 'php5-memcache',
  2160. 'memcached': 'php5-memcached',
  2161. 'mysql': 'php5-mysql',
  2162. 'mysqlnd': 'php5-mysqlnd',
  2163. 'net-smtp': 'php-net-smtp',
  2164. 'net4': 'php-net-ipv4',
  2165. 'net6': 'php-net-ipv6',
  2166. 'oauth': 'php5-oauth',
  2167. 'opcache': 'php5',
  2168. 'pear': 'php-pear',
  2169. 'pgsql': 'php5-pgsql',
  2170. 'php': 'php5',
  2171. 'phpenmod_command': 'php5enmod',
  2172. 'pspell': 'php5-pspell',
  2173. 'redis': 'php5-redis',
  2174. 'seclib': 'php-seclib',
  2175. 'snmp': 'php5-snmp',
  2176. 'soap': 'php-soap',
  2177. 'sqlite': 'php5-sqlite',
  2178. 'ssh2': 'php5-ssh2',
  2179. 'suhosin5_ext': 'suhosin.so',
  2180. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  2181. 'suhosin7_ext': 'suhosin7.so',
  2182. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  2183. 'svn': 'php5-svn',
  2184. 'sybase': 'php5-sybase',
  2185. 'tcpdf': 'php-tcpdf',
  2186. 'temp_dir': '/tmp',
  2187. 'tidy': 'php5-tidy',
  2188. 'uuid': 'php-uuid',
  2189. 'xcache': 'php5-xcache',
  2190. 'xdebug': 'php5-xdebug',
  2191. 'xml': 'php5',
  2192. 'xsl': 'php5-xsl',
  2193. 'zip': 'php5',
  2194. },
  2195. 'fpm': {
  2196. 'conf': '/etc/php5/fpm/php-fpm.conf',
  2197. 'ini': '/etc/php5/fpm/php.ini',
  2198. 'pools': '/etc/php5/fpm/pool.d',
  2199. 'service': 'php5-fpm',
  2200. 'defaults': odict([
  2201. ('global', odict([
  2202. ('pid', '/var/run/php5-fpm.pid'),
  2203. ('error_log', '/var/log/php5-fpm.log'),
  2204. ])),
  2205. ('include', '/etc/php5/fpm/pool.d/*.conf'),
  2206. ]),
  2207. },
  2208. 'hhvm': {
  2209. 'conf': '/etc/hhvm/server.ini',
  2210. 'ini': '/etc/hhvm/php.ini',
  2211. 'service': 'hhvm',
  2212. 'defaults': {},
  2213. 'server': odict([
  2214. ('pid', '/var/run/hhvm/pid'),
  2215. ('hhvm.server.port', '9000'),
  2216. ('hhvm.server.type', 'fastcgi'),
  2217. ('hhvm.server.default_document', 'index.php'),
  2218. ('hhvm.log.use_log_file', 'true'),
  2219. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  2220. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  2221. ]),
  2222. 'php': odict([
  2223. ('session.save_handler', 'files'),
  2224. ('session.save_path', '/var/lib/hhvm/sessions'),
  2225. ('session.gc_maxlifetime', '1440'),
  2226. ('hhvm.log.level', 'Warning'),
  2227. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  2228. ('hhvm.log.runtime_error_reporting_level', '8191'),
  2229. ('hhvm.mysql.typed_results', 'false'),
  2230. ]),
  2231. },
  2232. 'cli': {
  2233. 'ini': '/etc/php5/cli/php.ini',
  2234. },
  2235. 'apache2': {
  2236. 'ini': '/etc/php5/apache2/php.ini',
  2237. },
  2238. 'xcache': {
  2239. 'ini': '/etc/php5/mods-available/xcache.ini',
  2240. 'defaults': {},
  2241. },
  2242. },
  2243. 'RedHat': {
  2244. 'pkgs': {
  2245. 'adodb': 'php-adodb',
  2246. 'apc': 'php-pecl-apc',
  2247. 'apcu': 'php-pecl-apcu',
  2248. 'bcmath': 'php-bcmath',
  2249. 'build_pkgs': ['openssl-devel', 'gcc'],
  2250. 'cache-lite': 'php-pear-Cache-Lite',
  2251. 'cgi': 'php-cgi',
  2252. 'cli': 'php-cli',
  2253. 'composer': 'composer',
  2254. 'composer_bin': 'composer',
  2255. 'console-table': 'php-pear-Console-Table',
  2256. 'curl': ['php-common', 'curl'],
  2257. 'dev': 'php-devel',
  2258. 'ext_conf_path': '/etc/php.d',
  2259. 'fpm': 'php-fpm',
  2260. 'gd': 'php-gd',
  2261. 'geoip': 'php-pecl-geoip',
  2262. 'geshi': 'php-geshi',
  2263. 'gettext': 'php-php-gettext',
  2264. 'http': 'php-pecl-http',
  2265. 'imagick': 'php-pecl-imagick',
  2266. 'imap': 'php-imap',
  2267. 'intl': 'php-intl',
  2268. 'json': 'php-common',
  2269. 'ldap': 'php-ldap',
  2270. 'local_bin': '/usr/local/bin',
  2271. 'auth-sasl': 'php-pear-Auth-SASL',
  2272. 'mail': 'php-pear-Mail',
  2273. 'mbstring': 'php-mbstring',
  2274. 'mcrypt': 'php-mcrypt',
  2275. 'memcache': 'php-pecl-memcache',
  2276. 'memcached': 'php-pecl-memcached',
  2277. 'mysql': 'php-mysql',
  2278. 'mysqlnd': 'php-mysqlnd',
  2279. 'net-smtp': 'php-pear-Net-SMTP',
  2280. 'net4': 'php-pear-Net-IPv4',
  2281. 'oauth': 'php-pecl-oauth',
  2282. 'opcache': 'php-pecl-zendopcache',
  2283. 'pear': 'php-pear',
  2284. 'pgsql': 'php-pgsql',
  2285. 'php': 'php',
  2286. 'pspell': 'php-pspell',
  2287. 'redis': 'php-pecl-redis',
  2288. 'seclib': 'php-phpseclib',
  2289. 'snmp': 'php-snmp',
  2290. 'soap': 'php-soap',
  2291. 'sqlite': 'php-pdo',
  2292. 'ssh2': 'php-pecl-ssh2',
  2293. 'suhosin5_ext': 'suhosin.so',
  2294. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  2295. 'suhosin7_ext': 'suhosin7.so',
  2296. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  2297. 'tcpdf': 'php-tcpdf',
  2298. 'temp_dir': '/tmp',
  2299. 'tidy': 'php-tidy',
  2300. 'uuid': 'php-pecl-uuid',
  2301. 'xcache': 'php-xcache',
  2302. 'xdebug': 'php-pecl-xdebug',
  2303. 'xml': 'php-xml',
  2304. 'xsl': 'php-xml',
  2305. 'zip': 'php',
  2306. },
  2307. 'fpm': {
  2308. 'conf': '/etc/php-fpm.conf',
  2309. 'ini': '/etc/php.ini',
  2310. 'pools': '/etc/php-fpm.d',
  2311. 'service': 'php-fpm',
  2312. 'defaults': {
  2313. 'global': {
  2314. 'pid': '/var/run/php-fpm/php-fpm.pid',
  2315. 'error_log': '/var/log/php-fpm/error.log',
  2316. },
  2317. 'include': '/etc/php-fpm.d/*.conf',
  2318. },
  2319. },
  2320. 'cli': {
  2321. 'ini': '/etc/php.ini',
  2322. },
  2323. 'xcache': {
  2324. 'ini': '/etc/php.d/xcache.ini',
  2325. },
  2326. },
  2327. 'Suse': {
  2328. 'pkgs': {
  2329. 'adodb': 'php5-dba',
  2330. 'apache2': 'apache2-mod_php5',
  2331. 'cli': 'php5',
  2332. 'curl': 'php5-curl',
  2333. 'fpm': 'php5-fpm',
  2334. 'gd': 'php5-gd',
  2335. 'imap': 'php5-imap',
  2336. 'intl': 'php5-intl',
  2337. 'json': 'php5-json',
  2338. 'ldap': 'php5-ldap',
  2339. 'mbstring': 'php5-mbstring',
  2340. 'mcrypt': 'php5-mcrypt',
  2341. 'mysql': 'php5-mysql',
  2342. 'oauth': 'php5-oauth',
  2343. 'pear': 'php5-pear',
  2344. 'pgsql': 'php5-pgsql',
  2345. 'php': 'php5',
  2346. 'snmp': 'php5-snmp',
  2347. 'soap': 'php5-soap',
  2348. 'sqlite': 'php5-sqlite',
  2349. 'suhosin': 'php5-suhosin',
  2350. 'xml': ['php5-xmlreader','php5-xmlwriter','php5-xmlrpc'],
  2351. 'zip': 'php5-zip',
  2352. },
  2353. 'fpm': {
  2354. 'conf': '/etc/php-fpm.conf',
  2355. 'ini': '/etc/php.ini',
  2356. 'pools': '/etc/php-fpm.d',
  2357. 'service': 'php-fpm',
  2358. 'defaults': {
  2359. 'global': {
  2360. 'pid': '/var/run/php-fpm/php-fpm.pid',
  2361. 'error_log': '/var/log/php-fpm/error.log',
  2362. },
  2363. 'include': '/etc/php-fpm.d/*.conf',
  2364. },
  2365. },
  2366. 'cli': {
  2367. 'ini': '/etc/php.ini',
  2368. },
  2369. },
  2370. 'Arch': {
  2371. 'pkgs': {
  2372. 'apc': 'php-apcu',
  2373. 'apcu': 'php-apcu-bc',
  2374. 'cgi': 'php-cgi',
  2375. 'cli': 'php',
  2376. 'composer_bin': 'composer',
  2377. 'curl': 'curl',
  2378. 'fpm': 'php-fpm',
  2379. 'gd': 'php-gd',
  2380. 'geoip': 'php-geoip',
  2381. 'imap': 'php-imap',
  2382. 'intl': 'php-intl',
  2383. 'local_bin': '/usr/local/bin',
  2384. 'mcrypt': 'php-mcrypt',
  2385. 'memcache': 'php-memcache',
  2386. 'memcached': 'php-memcached',
  2387. 'pgsql': 'php-pgsql',
  2388. 'php': 'php',
  2389. 'pspell': 'php-pspell',
  2390. 'snmp': 'php-snmp',
  2391. 'sqlite': 'php-sqlite',
  2392. 'temp_dir': '/tmp',
  2393. 'tidy': 'php-tidy',
  2394. 'xcache': 'php-xcache',
  2395. 'xdebug': 'xdebug',
  2396. 'xsl': 'php-xsl',
  2397. },
  2398. 'fpm': {
  2399. 'conf': '/etc/php/php-fpm.conf',
  2400. 'ini': '/etc/php/php.ini',
  2401. 'pools': '/etc/php/fpm.d',
  2402. 'service': 'php-fpm',
  2403. 'defaults': {
  2404. 'global': {
  2405. 'pid': '/run/php-fpm/php-fpm.pid',
  2406. 'error_log': 'log/php-fpm.log',
  2407. },
  2408. 'include': '/etc/php/fpm.d/*.conf',
  2409. },
  2410. },
  2411. 'cli': {
  2412. 'ini': '/etc/php/php-cli.ini',
  2413. },
  2414. 'xcache': {
  2415. 'ini': '/etc/php/conf.d/xcache.ini',
  2416. },
  2417. },
  2418. 'FreeBSD': {
  2419. 'apache2': {
  2420. 'ini': '/usr/local/etc/php.ini',
  2421. 'module_config': '/usr/local/etc/apache24/modules.d/050_mod_php.conf',
  2422. 'name': 'apache24',
  2423. },
  2424. 'cli': {
  2425. 'ini': '/usr/local/etc/php.ini'
  2426. },
  2427. 'pkgs': {
  2428. 'apache2': 'mod_php' + freebsd_phpng_version,
  2429. 'composer_bin': 'composer',
  2430. 'cli': 'php' + freebsd_phpng_version,
  2431. 'ctype': 'php' + freebsd_phpng_version + '-ctype',
  2432. 'curl': 'php' + freebsd_phpng_version + '-curl',
  2433. 'filter': 'php' + freebsd_phpng_version + '-filter',
  2434. 'gd': 'php' + freebsd_phpng_version + '-gd',
  2435. 'hash': 'php' + freebsd_phpng_version + '-hash',
  2436. 'json': 'php' + freebsd_phpng_version + '-json',
  2437. 'local_bin': '/usr/local/bin',
  2438. 'mbstring': 'php' + freebsd_phpng_version + '-mbstring',
  2439. 'mcrypt': 'php' + freebsd_phpng_version + '-mcrypt',
  2440. 'mysql': 'php' + freebsd_phpng_version + '-mysqli',
  2441. 'openssl': 'php' + freebsd_phpng_version + '-openssl',
  2442. 'php': 'php' + freebsd_phpng_version,
  2443. 'phar': 'php' + freebsd_phpng_version + '-phar',
  2444. 'posix': 'php' + freebsd_phpng_version + '-posix',
  2445. 'session': 'php' + freebsd_phpng_version + '-session',
  2446. 'snmp': 'php' + freebsd_phpng_version + '-snmp',
  2447. 'temp_dir': '/tmp',
  2448. 'xml': 'php' + freebsd_phpng_version + '-xml',
  2449. 'zip': 'php' + freebsd_phpng_version + '-zip',
  2450. },
  2451. },
  2452. }),
  2453. 'fpm': {
  2454. 'service': {
  2455. 'enabled': True,
  2456. 'opts': {},
  2457. },
  2458. 'config': {
  2459. 'ini': {
  2460. 'opts': {},
  2461. 'settings': {},
  2462. },
  2463. 'conf': {
  2464. 'opts': {},
  2465. 'settings': {},
  2466. },
  2467. },
  2468. 'pools': {
  2469. 'default.conf': {
  2470. 'enabled': False,
  2471. 'opts': {},
  2472. },
  2473. },
  2474. },
  2475. 'hhvm': {
  2476. 'service': {
  2477. 'enabled': True,
  2478. 'opts': {},
  2479. },
  2480. 'config': {
  2481. 'server': {
  2482. 'opts': {},
  2483. 'settings': {},
  2484. },
  2485. 'php': {
  2486. 'opts': {},
  2487. 'settings': {},
  2488. },
  2489. },
  2490. },
  2491. 'cli': {
  2492. 'ini': {
  2493. 'opts': {},
  2494. 'settings': {},
  2495. }
  2496. },
  2497. 'apache2': {
  2498. 'ini': {
  2499. 'opts': {},
  2500. 'settings': {},
  2501. }
  2502. },
  2503. 'xcache': {
  2504. 'ini': {
  2505. 'defaults': {
  2506. 'xcache-common': {
  2507. 'extension': 'xcache.so',
  2508. },
  2509. 'xcache.admin': {
  2510. 'xcache.admin.enable_auth': 'On',
  2511. },
  2512. 'xcache': {
  2513. 'xcache.shm_scheme': '"mmap"',
  2514. 'xcache.size': '60M',
  2515. 'xcache.count': '1',
  2516. 'xcache.slots': '8K',
  2517. 'xcache.ttl': '0',
  2518. 'xcache.gc_interval': '0',
  2519. 'xcache.var_size': '4M',
  2520. 'xcache.var_count': '1',
  2521. 'xcache.var_slots': '8K',
  2522. 'xcache.var_ttl': '0',
  2523. 'xcache.var_maxttl': '0',
  2524. 'xcache.var_gc_interval': '300',
  2525. 'xcache.var_namespace_mode': '0',
  2526. 'xcache.var_namespace': '""',
  2527. 'xcache.readonly_protection': 'Off',
  2528. 'xcache.mmap_path': '"/dev/zero"',
  2529. 'xcache.coredump_directory': '""',
  2530. 'xcache.coredump_type': '0',
  2531. 'xcache.disable_on_crash': 'Off',
  2532. 'xcache.experimental': 'Off',
  2533. 'xcache.cacher': 'On',
  2534. 'xcache.stat': 'On',
  2535. 'xcache.optimizer': 'Off',
  2536. },
  2537. 'xcache.coverager': {
  2538. 'xcache.coverager': 'Off',
  2539. 'xcache.coverager_autostart': 'On',
  2540. 'xcache.coveragedump_directory': '""',
  2541. },
  2542. },
  2543. 'opts': {},
  2544. 'settings': {},
  2545. }
  2546. },
  2547. 'ini': {
  2548. 'defaults': {
  2549. 'PHP': {
  2550. 'engine': 'On',
  2551. 'allow_url_fopen': 'On',
  2552. 'allow_url_include': 'Off',
  2553. 'asp_tags': 'Off',
  2554. 'auto_globals_jit': 'On',
  2555. 'default_mimetype': '"text/html"',
  2556. 'default_socket_timeout': 60,
  2557. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  2558. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  2559. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  2560. 'display_errors': 'Off',
  2561. 'display_startup_errors': 'Off',
  2562. 'enable_dl': 'Off',
  2563. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  2564. 'expose_php': 'On',
  2565. 'file_uploads': 'On',
  2566. 'html_errors': 'On',
  2567. 'ignore_repeated_errors': 'Off',
  2568. 'ignore_repeated_source': 'Off',
  2569. 'implicit_flush': 'Off',
  2570. 'log_errors': 'On',
  2571. 'log_errors_max_len': 1024,
  2572. 'max_execution_time': 30,
  2573. 'max_file_uploads': 20,
  2574. 'max_input_nesting_level': 64,
  2575. 'max_input_time': 60,
  2576. 'max_input_vars': 1000,
  2577. 'memory_limit': '128M',
  2578. 'output_buffering': 4096,
  2579. 'post_max_size': '8M',
  2580. 'precision': 14,
  2581. 'register_argc_argv': 'Off',
  2582. 'report_memleaks': 'On',
  2583. 'request_order': 'GP',
  2584. 'serialize_precision': 17,
  2585. 'short_open_tag': 'Off',
  2586. 'track_errors': 'Off',
  2587. 'upload_max_filesize': '2M',
  2588. 'variables_order': 'GPCS',
  2589. 'zend.enable_gc': 'On',
  2590. 'zlib.output_compression': 'Off',
  2591. },
  2592. 'CLI Server': {
  2593. 'cli_server.color': 'On'
  2594. },
  2595. 'Date': {
  2596. 'date.timezone': 'America/New_York'
  2597. },
  2598. 'Pdo_mysql': {
  2599. 'pdo_mysql.cache_size': 2000
  2600. },
  2601. 'mail function': {
  2602. 'SMTP': 'localhost',
  2603. 'mail.add_x_header': 'On'
  2604. },
  2605. 'SQL': {
  2606. 'sql.safe_mode': 'Off'
  2607. },
  2608. 'ODBC': {
  2609. 'odbc.allow_persistent': 'On',
  2610. 'odbc.check_persistent': 'On',
  2611. 'odbc.max_persistent': '-1',
  2612. 'odbc.max_links': '-1',
  2613. 'odbc.defaultlrl': 4096,
  2614. 'odbc.defaultbinmode': 1
  2615. },
  2616. 'Interbase': {
  2617. 'ibase.allow_persistent': 1,
  2618. 'ibase.max_persistent': -1,
  2619. 'ibase.max_links': -1,
  2620. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  2621. 'ibase.dateformat': '"%Y-%m-%d"',
  2622. 'ibase.timeformat': '"%H:%M:%S"'
  2623. },
  2624. 'MySQL': {
  2625. 'mysql.allow_local_infile': 'On',
  2626. 'mysql.allow_persistent': 'On',
  2627. 'mysql.cache_size': '2000',
  2628. 'mysql.max_persistent': -1,
  2629. 'mysql.max_links': -1,
  2630. 'mysql.connect_timeout': 60,
  2631. 'mysql.trace_mode': 'Off'
  2632. },
  2633. 'MySQLi': {
  2634. 'mysqli.max_persistent': -1,
  2635. 'mysqli.allow_persistent': 'On',
  2636. 'mysqli.max_links': -1,
  2637. 'mysqli.cache_size': 2000,
  2638. 'mysqli.default_port': 3306,
  2639. 'mysqli.reconnect': 'Off'
  2640. },
  2641. 'mysqlnd': {
  2642. 'mysqlnd.collect_statistics': 'On',
  2643. 'mysqlnd.collect_memory_statistics': 'Off'
  2644. },
  2645. 'PostgreSQL': {
  2646. 'pgsql.allow_persistent': 'On',
  2647. 'pgsql.auto_reset_persistent': 'Off',
  2648. 'pgsql.max_persistent': -1,
  2649. 'pgsql.max_links': -1,
  2650. 'pgsql.ignore_notice': 0,
  2651. 'pgsql.log_notice': 0
  2652. },
  2653. 'Sybase-CT': {
  2654. 'sybct.allow_persistent': 'On',
  2655. 'sybct.max_persistent': -1,
  2656. 'sybct.max_links': -1,
  2657. 'sybct.min_server_severity': 10,
  2658. 'sybct.min_client_severity': 10
  2659. },
  2660. 'bcmath': {
  2661. 'bcmath.scale': 0
  2662. },
  2663. 'Session': {
  2664. 'session.save_handler': 'files',
  2665. 'session.use_strict_mode': 0,
  2666. 'session.use_cookies': 1,
  2667. 'session.use_only_cookies': 1,
  2668. 'session.name': 'PHPSESSID',
  2669. 'session.auto_start': 0,
  2670. 'session.cookie_lifetime': 0,
  2671. 'session.cookie_path': '/',
  2672. 'session.serialize_handler': 'php',
  2673. 'session.gc_probability': 0,
  2674. 'session.gc_divisor': 1000,
  2675. 'session.gc_maxlifetime': 1440,
  2676. 'session.bug_compat_42': 'Off',
  2677. 'session.bug_compat_warn': 'Off',
  2678. 'session.cache_limiter': 'nocache',
  2679. 'session.cache_expire': '180',
  2680. 'session.use_trans_sid': 0,
  2681. 'session.hash_function': 0,
  2682. 'session.hash_bits_per_character': 5,
  2683. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  2684. },
  2685. 'MSSQL': {
  2686. 'mssql.allow_persistent': 'On',
  2687. 'mssql.max_persistent': -1,
  2688. 'mssql.max_links': -1,
  2689. 'mssql.min_error_severity': 10,
  2690. 'mssql.min_message_severity': 10,
  2691. 'mssql.compatibility_mode': 'Off',
  2692. 'mssql.secure_connection': 'Off'
  2693. },
  2694. 'Tidy': {
  2695. 'tidy.clean_output': 'Off'
  2696. },
  2697. 'soap': {
  2698. 'soap.wsdl_cache_enabled': 1,
  2699. 'soap.wsdl_cache_dir': '"/tmp"',
  2700. 'soap.wsdl_cache_ttl': 86400,
  2701. 'soap.wsdl_cache_limit': 5
  2702. },
  2703. 'ldap': {
  2704. 'ldap.max_links': -1
  2705. },
  2706. },
  2707. },
  2708. }, merge=True) %}
  2709. {%- endif %}