Saltstack Official PHP Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

3169 rindas
154KB

  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 >= '18.04' %}
  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.2-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.2-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.2-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.2-tidy',
  718. 'xcache': 'php',
  719. 'xdebug': 'php-xdebug',
  720. 'xml': 'php-xml',
  721. 'xsl': 'php7.2-xsl',
  722. 'zip': 'php-zip',
  723. },
  724. 'fpm': {
  725. 'conf': '/etc/php/7.2/fpm/php-fpm.conf',
  726. 'ini': '/etc/php/7.2/fpm/php.ini',
  727. 'pools': '/etc/php/7.2/fpm/pool.d',
  728. 'service': 'php7.2-fpm',
  729. 'defaults': odict([
  730. ('global', odict([
  731. ('pid', '/var/run/php7.2-fpm.pid'),
  732. ('error_log', '/var/log/php7.2-fpm.log'),
  733. ])),
  734. ('include', '/etc/php/7.2/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.2/cli/php.ini',
  763. },
  764. 'apache2': {
  765. 'ini': '/etc/php/7.2/apache2/php.ini',
  766. },
  767. 'xcache': {
  768. 'ini': '/etc/php/7.2/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 >= '17.10' %}
  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.1-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.1-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.1-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.1-tidy',
  1088. 'xcache': 'php',
  1089. 'xdebug': 'php-xdebug',
  1090. 'xml': 'php-xml',
  1091. 'xsl': 'php7.1-xsl',
  1092. 'zip': 'php-zip',
  1093. },
  1094. 'fpm': {
  1095. 'conf': '/etc/php/7.1/fpm/php-fpm.conf',
  1096. 'ini': '/etc/php/7.1/fpm/php.ini',
  1097. 'pools': '/etc/php/7.1/fpm/pool.d',
  1098. 'service': 'php7.1-fpm',
  1099. 'defaults': odict([
  1100. ('global', odict([
  1101. ('pid', '/var/run/php7.1-fpm.pid'),
  1102. ('error_log', '/var/log/php7.1-fpm.log'),
  1103. ])),
  1104. ('include', '/etc/php/7.1/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.1/cli/php.ini',
  1133. },
  1134. 'apache2': {
  1135. 'ini': '/etc/php/7.1/apache2/php.ini',
  1136. },
  1137. 'xcache': {
  1138. 'ini': '/etc/php/7.1/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. {%- elif salt['grains.get']('osrelease')|string >= '16.04' %}
  1400. {%- set php = salt['pillar.get']('php:ng', {
  1401. 'lookup': salt['grains.filter_by']({
  1402. 'Ubuntu': {
  1403. 'pkgs': {
  1404. 'adodb': 'libphp-adodb',
  1405. 'apache2': 'libapache2-mod-php',
  1406. 'apc': 'php',
  1407. 'apcu': 'php-apcu',
  1408. 'bcmath': 'php7.0-bcmath',
  1409. 'cache-lite': 'php-cache-lite',
  1410. 'cgi': 'php-cgi',
  1411. 'cli': 'php-cli',
  1412. 'console-table': 'php-console-table',
  1413. 'composer_bin': 'composer',
  1414. 'curl': 'php-curl',
  1415. 'dev': 'php7.0-dev',
  1416. 'fpm': 'php-fpm',
  1417. 'gd': 'php-gd',
  1418. 'geoip': 'php-geoip',
  1419. 'geshi': 'php-geshi',
  1420. 'gmp': 'php-gmp',
  1421. 'hhvm': 'hhvm',
  1422. 'imagick': 'php-imagick',
  1423. 'imap': 'php-imap',
  1424. 'intl': 'php-intl',
  1425. 'json': 'php-json',
  1426. 'ldap': 'php-ldap',
  1427. 'local_bin': '/usr/local/bin',
  1428. 'auth-sasl': 'php-auth-sasl',
  1429. 'mail': 'php-mail',
  1430. 'mbstring': 'php-mbstring',
  1431. 'mcrypt': 'php-mcrypt',
  1432. 'memcache': 'php-memcache',
  1433. 'memcached': 'php-memcached',
  1434. 'mongodb': 'php-mongodb',
  1435. 'mysql': 'php-mysql',
  1436. 'mysqlnd': 'php',
  1437. 'net-smtp': 'php-net-smtp',
  1438. 'net4': 'php-net-ipv4',
  1439. 'net6': 'php-net-ipv6',
  1440. 'oauth': 'php-oauth',
  1441. 'opcache': 'php7.0-opcache',
  1442. 'pear': 'php-pear',
  1443. 'pgsql': 'php-pgsql',
  1444. 'php': 'php',
  1445. 'phpenmod_command': 'phpenmod',
  1446. 'pspell': 'php-pspell',
  1447. 'redis': 'php-redis',
  1448. 'seclib': ['php-phpseclib', 'php-seclib'],
  1449. 'snmp': 'php-snmp',
  1450. 'soap': 'php-soap',
  1451. 'sqlite': 'php-sqlite3',
  1452. 'ssh2': 'php-ssh2',
  1453. 'suhosin': 'php',
  1454. 'sybase': 'php-sybase',
  1455. 'tcpdf': 'php-tcpdf',
  1456. 'temp_dir': '/tmp',
  1457. 'tidy': 'php7.0-tidy',
  1458. 'xcache': 'php',
  1459. 'xdebug': 'php-xdebug',
  1460. 'xml': 'php-xml',
  1461. 'xsl': 'php7.0-xsl',
  1462. 'zip': 'php-zip',
  1463. },
  1464. 'fpm': {
  1465. 'conf': '/etc/php/7.0/fpm/php-fpm.conf',
  1466. 'ini': '/etc/php/7.0/fpm/php.ini',
  1467. 'pools': '/etc/php/7.0/fpm/pool.d',
  1468. 'service': 'php7.0-fpm',
  1469. 'defaults': odict([
  1470. ('global', odict([
  1471. ('pid', '/var/run/php7.0-fpm.pid'),
  1472. ('error_log', '/var/log/php7.0-fpm.log'),
  1473. ])),
  1474. ('include', '/etc/php/7.0/fpm/pool.d/*.conf'),
  1475. ]),
  1476. },
  1477. 'hhvm': {
  1478. 'conf': '/etc/hhvm/server.ini',
  1479. 'ini': '/etc/hhvm/php.ini',
  1480. 'service': 'hhvm',
  1481. 'defaults': {},
  1482. 'server': odict([
  1483. ('pid', '/var/run/hhvm/pid'),
  1484. ('hhvm.server.port', '9000'),
  1485. ('hhvm.server.type', 'fastcgi'),
  1486. ('hhvm.server.default_document', 'index.php'),
  1487. ('hhvm.log.use_log_file', 'true'),
  1488. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  1489. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  1490. ]),
  1491. 'php': odict([
  1492. ('session.save_handler', 'files'),
  1493. ('session.save_path', '/var/lib/hhvm/sessions'),
  1494. ('session.gc_maxlifetime', '1440'),
  1495. ('hhvm.log.level', 'Warning'),
  1496. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  1497. ('hhvm.log.runtime_error_reporting_level', '8191'),
  1498. ('hhvm.mysql.typed_results', 'false'),
  1499. ]),
  1500. },
  1501. 'cli': {
  1502. 'ini': '/etc/php/7.0/cli/php.ini',
  1503. },
  1504. 'apache2': {
  1505. 'ini': '/etc/php/7.0/apache2/php.ini',
  1506. },
  1507. 'xcache': {
  1508. 'ini': '/etc/php/7.0/mods-available/xcache.ini',
  1509. 'defaults': {},
  1510. },
  1511. },
  1512. }, grain="os"),
  1513. 'fpm': {
  1514. 'service': {
  1515. 'enabled': True,
  1516. 'opts': {},
  1517. },
  1518. 'config': {
  1519. 'ini': {
  1520. 'opts': {},
  1521. 'settings': {},
  1522. },
  1523. 'conf': {
  1524. 'opts': {},
  1525. 'settings': {},
  1526. },
  1527. },
  1528. 'pools': {
  1529. 'default.conf': {
  1530. 'enabled': False,
  1531. 'opts': {},
  1532. },
  1533. },
  1534. },
  1535. 'hhvm': {
  1536. 'service': {
  1537. 'enabled': True,
  1538. 'opts': {},
  1539. },
  1540. 'config': {
  1541. 'server': {
  1542. 'opts': {},
  1543. 'settings': {},
  1544. },
  1545. 'php': {
  1546. 'opts': {},
  1547. 'settings': {},
  1548. },
  1549. },
  1550. },
  1551. 'cli': {
  1552. 'ini': {
  1553. 'opts': {},
  1554. 'settings': {},
  1555. }
  1556. },
  1557. 'apache2': {
  1558. 'ini': {
  1559. 'opts': {},
  1560. 'settings': {},
  1561. }
  1562. },
  1563. 'xcache': {
  1564. 'ini': {
  1565. 'defaults': {
  1566. 'xcache-common': {
  1567. 'extension': 'xcache.so',
  1568. },
  1569. 'xcache.admin': {
  1570. 'xcache.admin.enable_auth': 'On',
  1571. },
  1572. 'xcache': {
  1573. 'xcache.shm_scheme': '"mmap"',
  1574. 'xcache.size': '60M',
  1575. 'xcache.count': '1',
  1576. 'xcache.slots': '8K',
  1577. 'xcache.ttl': '0',
  1578. 'xcache.gc_interval': '0',
  1579. 'xcache.var_size': '4M',
  1580. 'xcache.var_count': '1',
  1581. 'xcache.var_slots': '8K',
  1582. 'xcache.var_ttl': '0',
  1583. 'xcache.var_maxttl': '0',
  1584. 'xcache.var_gc_interval': '300',
  1585. 'xcache.var_namespace_mode': '0',
  1586. 'xcache.var_namespace': '""',
  1587. 'xcache.readonly_protection': 'Off',
  1588. 'xcache.mmap_path': '"/dev/zero"',
  1589. 'xcache.coredump_directory': '""',
  1590. 'xcache.coredump_type': '0',
  1591. 'xcache.disable_on_crash': 'Off',
  1592. 'xcache.experimental': 'Off',
  1593. 'xcache.cacher': 'On',
  1594. 'xcache.stat': 'On',
  1595. 'xcache.optimizer': 'Off',
  1596. },
  1597. 'xcache.coverager': {
  1598. 'xcache.coverager': 'Off',
  1599. 'xcache.coverager_autostart': 'On',
  1600. 'xcache.coveragedump_directory': '""',
  1601. },
  1602. },
  1603. 'opts': {},
  1604. 'settings': {},
  1605. }
  1606. },
  1607. 'ini': {
  1608. 'defaults': {
  1609. 'PHP': {
  1610. 'allow_url_fopen': 'On',
  1611. 'allow_url_include': 'Off',
  1612. 'asp_tags': 'Off',
  1613. 'auto_globals_jit': 'On',
  1614. 'default_mimetype': '"text/html"',
  1615. 'default_socket_timeout': 60,
  1616. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  1617. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  1618. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  1619. 'display_errors': 'Off',
  1620. 'display_startup_errors': 'Off',
  1621. 'enable_dl': 'Off',
  1622. 'engine': 'On',
  1623. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  1624. 'expose_php': 'On',
  1625. 'file_uploads': 'On',
  1626. 'html_errors': 'On',
  1627. 'ignore_repeated_errors': 'Off',
  1628. 'ignore_repeated_source': 'Off',
  1629. 'implicit_flush': 'Off',
  1630. 'log_errors': 'On',
  1631. 'log_errors_max_len': 1024,
  1632. 'max_execution_time': 30,
  1633. 'max_file_uploads': 20,
  1634. 'max_input_nesting_level': 64,
  1635. 'max_input_time': 60,
  1636. 'max_input_vars': 1000,
  1637. 'memory_limit': '128M',
  1638. 'output_buffering': 4096,
  1639. 'post_max_size': '8M',
  1640. 'precision': 14,
  1641. 'register_argc_argv': 'Off',
  1642. 'report_memleaks': 'On',
  1643. 'request_order': 'GP',
  1644. 'serialize_precision': 17,
  1645. 'short_open_tag': 'Off',
  1646. 'track_errors': 'Off',
  1647. 'upload_max_filesize': '2M',
  1648. 'variables_order': 'GPCS',
  1649. 'zend.enable_gc': 'On',
  1650. 'zlib.output_compression': 'Off',
  1651. },
  1652. 'CLI Server': {
  1653. 'cli_server.color': 'On'
  1654. },
  1655. 'Date': {
  1656. 'date.timezone': 'America/New_York'
  1657. },
  1658. 'Pdo_mysql': {
  1659. 'pdo_mysql.cache_size': 2000
  1660. },
  1661. 'mail function': {
  1662. 'SMTP': 'localhost',
  1663. 'mail.add_x_header': 'On'
  1664. },
  1665. 'SQL': {
  1666. 'sql.safe_mode': 'Off'
  1667. },
  1668. 'ODBC': {
  1669. 'odbc.allow_persistent': 'On',
  1670. 'odbc.check_persistent': 'On',
  1671. 'odbc.max_persistent': '-1',
  1672. 'odbc.max_links': '-1',
  1673. 'odbc.defaultlrl': 4096,
  1674. 'odbc.defaultbinmode': 1
  1675. },
  1676. 'Interbase': {
  1677. 'ibase.allow_persistent': 1,
  1678. 'ibase.max_persistent': -1,
  1679. 'ibase.max_links': -1,
  1680. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  1681. 'ibase.dateformat': '"%Y-%m-%d"',
  1682. 'ibase.timeformat': '"%H:%M:%S"'
  1683. },
  1684. 'MySQL': {
  1685. 'mysql.allow_local_infile': 'On',
  1686. 'mysql.allow_persistent': 'On',
  1687. 'mysql.cache_size': '2000',
  1688. 'mysql.max_persistent': -1,
  1689. 'mysql.max_links': -1,
  1690. 'mysql.connect_timeout': 60,
  1691. 'mysql.trace_mode': 'Off'
  1692. },
  1693. 'MySQLi': {
  1694. 'mysqli.max_persistent': -1,
  1695. 'mysqli.allow_persistent': 'On',
  1696. 'mysqli.max_links': -1,
  1697. 'mysqli.cache_size': 2000,
  1698. 'mysqli.default_port': 3306,
  1699. 'mysqli.reconnect': 'Off'
  1700. },
  1701. 'mysqlnd': {
  1702. 'mysqlnd.collect_statistics': 'On',
  1703. 'mysqlnd.collect_memory_statistics': 'Off'
  1704. },
  1705. 'PostgreSQL': {
  1706. 'pgsql.allow_persistent': 'On',
  1707. 'pgsql.auto_reset_persistent': 'Off',
  1708. 'pgsql.max_persistent': -1,
  1709. 'pgsql.max_links': -1,
  1710. 'pgsql.ignore_notice': 0,
  1711. 'pgsql.log_notice': 0
  1712. },
  1713. 'Sybase-CT': {
  1714. 'sybct.allow_persistent': 'On',
  1715. 'sybct.max_persistent': -1,
  1716. 'sybct.max_links': -1,
  1717. 'sybct.min_server_severity': 10,
  1718. 'sybct.min_client_severity': 10
  1719. },
  1720. 'bcmath': {
  1721. 'bcmath.scale': 0
  1722. },
  1723. 'Session': {
  1724. 'session.save_handler': 'files',
  1725. 'session.use_strict_mode': 0,
  1726. 'session.use_cookies': 1,
  1727. 'session.use_only_cookies': 1,
  1728. 'session.name': 'PHPSESSID',
  1729. 'session.auto_start': 0,
  1730. 'session.cookie_lifetime': 0,
  1731. 'session.cookie_path': '/',
  1732. 'session.serialize_handler': 'php',
  1733. 'session.gc_probability': 0,
  1734. 'session.gc_divisor': 1000,
  1735. 'session.gc_maxlifetime': 1440,
  1736. 'session.bug_compat_42': 'Off',
  1737. 'session.bug_compat_warn': 'Off',
  1738. 'session.cache_limiter': 'nocache',
  1739. 'session.cache_expire': '180',
  1740. 'session.use_trans_sid': 0,
  1741. 'session.hash_function': 0,
  1742. 'session.hash_bits_per_character': 5,
  1743. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  1744. },
  1745. 'MSSQL': {
  1746. 'mssql.allow_persistent': 'On',
  1747. 'mssql.max_persistent': -1,
  1748. 'mssql.max_links': -1,
  1749. 'mssql.min_error_severity': 10,
  1750. 'mssql.min_message_severity': 10,
  1751. 'mssql.compatibility_mode': 'Off',
  1752. 'mssql.secure_connection': 'Off'
  1753. },
  1754. 'Tidy': {
  1755. 'tidy.clean_output': 'Off'
  1756. },
  1757. 'soap': {
  1758. 'soap.wsdl_cache_enabled': 1,
  1759. 'soap.wsdl_cache_dir': '"/tmp"',
  1760. 'soap.wsdl_cache_ttl': 86400,
  1761. 'soap.wsdl_cache_limit': 5
  1762. },
  1763. 'ldap': {
  1764. 'ldap.max_links': -1
  1765. },
  1766. },
  1767. },
  1768. }, merge=True) %}
  1769. {%- else %}
  1770. {%- set php = salt['pillar.get']('php:ng', {
  1771. 'lookup': salt['grains.filter_by']({
  1772. 'Ubuntu': {
  1773. 'pkgs': {
  1774. 'adodb': 'php5-adodb',
  1775. 'apache2': 'libapache2-mod-php5',
  1776. 'apc': 'php-apc',
  1777. 'apcu': 'php5-apcu',
  1778. 'bcmath': 'php5',
  1779. 'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev'],
  1780. 'cache-lite': 'php-cache-lite',
  1781. 'cgi': 'php5-cgi',
  1782. 'cli': 'php5-cli',
  1783. 'composer_bin': 'composer',
  1784. 'console-table': 'php-console-table',
  1785. 'curl': 'php5-curl',
  1786. 'dev': ['php5-dev','build-essential'],
  1787. 'ext_conf_path': salt['grains.filter_by']({
  1788. 'precise': '/etc/php5/conf.d',
  1789. 'default': '/etc/php5/mods-available',
  1790. }, grain='oscodename'),
  1791. 'fpm': 'php5-fpm',
  1792. 'gd': 'php5-gd',
  1793. 'gearman': 'php5-gearman',
  1794. 'geoip': 'php5-geoip',
  1795. 'geshi': 'php-geshi',
  1796. 'gettext': 'php-gettext',
  1797. 'gmp': 'php5-gmp',
  1798. 'hhvm': 'hhvm',
  1799. 'imagick': 'php5-imagick',
  1800. 'imap': 'php5-imap',
  1801. 'intl': 'php5-intl',
  1802. 'json': 'php5-json',
  1803. 'ldap': 'php5-ldap',
  1804. 'local_bin': '/usr/local/bin',
  1805. 'auth-sasl': 'php-auth-sasl',
  1806. 'mail': 'php-mail',
  1807. 'mbstring': 'php5',
  1808. 'mcrypt': 'php5-mcrypt',
  1809. 'mdb2': 'php-mdb2',
  1810. 'mdb2-driver-mysql': 'php-mdb2-driver-mysql',
  1811. 'mdb2-driver-pgsql': 'php-mdb2-driver-pgsql',
  1812. 'memcache': 'php5-memcache',
  1813. 'memcached': 'php5-memcached',
  1814. 'mongodb': salt['grains.filter_by']({
  1815. 'trusty': 'php5-mongo',
  1816. 'default': '',
  1817. }, grain='oscodename'),
  1818. 'mysql': 'php5-mysql',
  1819. 'mysqlnd': 'php5-mysqlnd',
  1820. 'net-smtp': 'php-net-smtp',
  1821. 'net4': 'php-net-ipv4',
  1822. 'net6': 'php-net-ipv6',
  1823. 'oauth': 'php5-oauth',
  1824. 'opcache': 'php5',
  1825. 'pear': 'php-pear',
  1826. 'pgsql': 'php5-pgsql',
  1827. 'php': 'php5',
  1828. 'phpenmod_command': salt['grains.filter_by']({
  1829. 'precise': 'true',
  1830. 'default': 'php5enmod',
  1831. }, grain='oscodename'),
  1832. 'pspell': 'php5-pspell',
  1833. 'redis': 'php5-redis',
  1834. 'seclib': 'php-seclib',
  1835. 'snmp': 'php5-snmp',
  1836. 'soap': 'php-soap',
  1837. 'sqlite': 'php5-sqlite',
  1838. 'ssh2': 'libssh2-php',
  1839. 'suhosin5_ext': 'suhosin.so',
  1840. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  1841. 'suhosin7_ext': 'suhosin7.so',
  1842. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  1843. 'svn': 'php5-svn',
  1844. 'tcpdf': 'php-tcpdf',
  1845. 'tidy': 'php5-tidy',
  1846. 'temp_dir': '/tmp',
  1847. 'xcache': 'php5-xcache',
  1848. 'xdebug': 'php5-xdebug',
  1849. 'xml': 'php5',
  1850. 'xsl': 'php5-xsl',
  1851. 'zip': 'php5',
  1852. },
  1853. 'fpm': {
  1854. 'conf': '/etc/php5/fpm/php-fpm.conf',
  1855. 'ini': '/etc/php5/fpm/php.ini',
  1856. 'pools': '/etc/php5/fpm/pool.d',
  1857. 'service': 'php5-fpm',
  1858. 'defaults': odict([
  1859. ('global', odict([
  1860. ('pid', '/var/run/php5-fpm.pid'),
  1861. ('error_log', '/var/log/php5-fpm.log'),
  1862. ])),
  1863. ('include', '/etc/php5/fpm/pool.d/*.conf'),
  1864. ]),
  1865. },
  1866. 'hhvm': {
  1867. 'conf': '/etc/hhvm/server.ini',
  1868. 'ini': '/etc/hhvm/php.ini',
  1869. 'service': 'hhvm',
  1870. 'defaults': {},
  1871. 'server': odict([
  1872. ('pid', '/var/run/hhvm/pid'),
  1873. ('hhvm.server.port', '9000'),
  1874. ('hhvm.server.type', 'fastcgi'),
  1875. ('hhvm.server.default_document', 'index.php'),
  1876. ('hhvm.log.use_log_file', 'true'),
  1877. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  1878. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  1879. ]),
  1880. 'php': odict([
  1881. ('session.save_handler', 'files'),
  1882. ('session.save_path', '/var/lib/hhvm/sessions'),
  1883. ('session.gc_maxlifetime', '1440'),
  1884. ('hhvm.log.level', 'Warning'),
  1885. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  1886. ('hhvm.log.runtime_error_reporting_level', '8191'),
  1887. ('hhvm.mysql.typed_results', 'false'),
  1888. ]),
  1889. },
  1890. 'cli': {
  1891. 'ini': '/etc/php5/cli/php.ini',
  1892. },
  1893. 'apache2': {
  1894. 'ini': '/etc/php5/apache2/php.ini',
  1895. },
  1896. 'xcache': {
  1897. 'ini': '/etc/php5/mods-available/xcache.ini',
  1898. 'defaults': {},
  1899. },
  1900. },
  1901. }, grain="os"),
  1902. 'fpm': {
  1903. 'service': {
  1904. 'enabled': True,
  1905. 'opts': {},
  1906. },
  1907. 'config': {
  1908. 'ini': {
  1909. 'opts': {},
  1910. 'settings': {},
  1911. },
  1912. 'conf': {
  1913. 'opts': {},
  1914. 'settings': {},
  1915. },
  1916. },
  1917. 'pools': {
  1918. 'default.conf': {
  1919. 'enabled': False,
  1920. 'opts': {},
  1921. },
  1922. },
  1923. },
  1924. 'hhvm': {
  1925. 'service': {
  1926. 'enabled': True,
  1927. 'opts': {},
  1928. },
  1929. 'config': {
  1930. 'server': {
  1931. 'opts': {},
  1932. 'settings': {},
  1933. },
  1934. 'php': {
  1935. 'opts': {},
  1936. 'settings': {},
  1937. },
  1938. },
  1939. },
  1940. 'cli': {
  1941. 'ini': {
  1942. 'opts': {},
  1943. 'settings': {},
  1944. }
  1945. },
  1946. 'apache2': {
  1947. 'ini': {
  1948. 'opts': {},
  1949. 'settings': {},
  1950. }
  1951. },
  1952. 'xcache': {
  1953. 'ini': {
  1954. 'defaults': {
  1955. 'xcache-common': {
  1956. 'extension': 'xcache.so',
  1957. },
  1958. 'xcache.admin': {
  1959. 'xcache.admin.enable_auth': 'On',
  1960. },
  1961. 'xcache': {
  1962. 'xcache.shm_scheme': '"mmap"',
  1963. 'xcache.size': '60M',
  1964. 'xcache.count': '1',
  1965. 'xcache.slots': '8K',
  1966. 'xcache.ttl': '0',
  1967. 'xcache.gc_interval': '0',
  1968. 'xcache.var_size': '4M',
  1969. 'xcache.var_count': '1',
  1970. 'xcache.var_slots': '8K',
  1971. 'xcache.var_ttl': '0',
  1972. 'xcache.var_maxttl': '0',
  1973. 'xcache.var_gc_interval': '300',
  1974. 'xcache.var_namespace_mode': '0',
  1975. 'xcache.var_namespace': '""',
  1976. 'xcache.readonly_protection': 'Off',
  1977. 'xcache.mmap_path': '"/dev/zero"',
  1978. 'xcache.coredump_directory': '""',
  1979. 'xcache.coredump_type': '0',
  1980. 'xcache.disable_on_crash': 'Off',
  1981. 'xcache.experimental': 'Off',
  1982. 'xcache.cacher': 'On',
  1983. 'xcache.stat': 'On',
  1984. 'xcache.optimizer': 'Off',
  1985. },
  1986. 'xcache.coverager': {
  1987. 'xcache.coverager': 'Off',
  1988. 'xcache.coverager_autostart': 'On',
  1989. 'xcache.coveragedump_directory': '""',
  1990. },
  1991. },
  1992. 'opts': {},
  1993. 'settings': {},
  1994. }
  1995. },
  1996. 'ini': {
  1997. 'defaults': {
  1998. 'PHP': {
  1999. 'allow_url_fopen': 'On',
  2000. 'allow_url_include': 'Off',
  2001. 'asp_tags': 'Off',
  2002. 'auto_globals_jit': 'On',
  2003. 'default_mimetype': '"text/html"',
  2004. 'default_socket_timeout': 60,
  2005. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  2006. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  2007. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  2008. 'display_errors': 'Off',
  2009. 'display_startup_errors': 'Off',
  2010. 'enable_dl': 'Off',
  2011. 'engine': 'On',
  2012. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  2013. 'expose_php': 'On',
  2014. 'file_uploads': 'On',
  2015. 'html_errors': 'On',
  2016. 'ignore_repeated_errors': 'Off',
  2017. 'ignore_repeated_source': 'Off',
  2018. 'implicit_flush': 'Off',
  2019. 'log_errors': 'On',
  2020. 'log_errors_max_len': 1024,
  2021. 'max_execution_time': 30,
  2022. 'max_file_uploads': 20,
  2023. 'max_input_nesting_level': 64,
  2024. 'max_input_time': 60,
  2025. 'max_input_vars': 1000,
  2026. 'memory_limit': '128M',
  2027. 'output_buffering': 4096,
  2028. 'post_max_size': '8M',
  2029. 'precision': 14,
  2030. 'register_argc_argv': 'Off',
  2031. 'report_memleaks': 'On',
  2032. 'request_order': 'GP',
  2033. 'serialize_precision': 17,
  2034. 'short_open_tag': 'Off',
  2035. 'track_errors': 'Off',
  2036. 'upload_max_filesize': '2M',
  2037. 'variables_order': 'GPCS',
  2038. 'zend.enable_gc': 'On',
  2039. 'zlib.output_compression': 'Off',
  2040. },
  2041. 'CLI Server': {
  2042. 'cli_server.color': 'On'
  2043. },
  2044. 'Date': {
  2045. 'date.timezone': 'America/New_York'
  2046. },
  2047. 'Pdo_mysql': {
  2048. 'pdo_mysql.cache_size': 2000
  2049. },
  2050. 'mail function': {
  2051. 'SMTP': 'localhost',
  2052. 'mail.add_x_header': 'On'
  2053. },
  2054. 'SQL': {
  2055. 'sql.safe_mode': 'Off'
  2056. },
  2057. 'ODBC': {
  2058. 'odbc.allow_persistent': 'On',
  2059. 'odbc.check_persistent': 'On',
  2060. 'odbc.max_persistent': '-1',
  2061. 'odbc.max_links': '-1',
  2062. 'odbc.defaultlrl': 4096,
  2063. 'odbc.defaultbinmode': 1
  2064. },
  2065. 'Interbase': {
  2066. 'ibase.allow_persistent': 1,
  2067. 'ibase.max_persistent': -1,
  2068. 'ibase.max_links': -1,
  2069. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  2070. 'ibase.dateformat': '"%Y-%m-%d"',
  2071. 'ibase.timeformat': '"%H:%M:%S"'
  2072. },
  2073. 'MySQL': {
  2074. 'mysql.allow_local_infile': 'On',
  2075. 'mysql.allow_persistent': 'On',
  2076. 'mysql.cache_size': '2000',
  2077. 'mysql.max_persistent': -1,
  2078. 'mysql.max_links': -1,
  2079. 'mysql.connect_timeout': 60,
  2080. 'mysql.trace_mode': 'Off'
  2081. },
  2082. 'MySQLi': {
  2083. 'mysqli.max_persistent': -1,
  2084. 'mysqli.allow_persistent': 'On',
  2085. 'mysqli.max_links': -1,
  2086. 'mysqli.cache_size': 2000,
  2087. 'mysqli.default_port': 3306,
  2088. 'mysqli.reconnect': 'Off'
  2089. },
  2090. 'mysqlnd': {
  2091. 'mysqlnd.collect_statistics': 'On',
  2092. 'mysqlnd.collect_memory_statistics': 'Off'
  2093. },
  2094. 'PostgreSQL': {
  2095. 'pgsql.allow_persistent': 'On',
  2096. 'pgsql.auto_reset_persistent': 'Off',
  2097. 'pgsql.max_persistent': -1,
  2098. 'pgsql.max_links': -1,
  2099. 'pgsql.ignore_notice': 0,
  2100. 'pgsql.log_notice': 0
  2101. },
  2102. 'Sybase-CT': {
  2103. 'sybct.allow_persistent': 'On',
  2104. 'sybct.max_persistent': -1,
  2105. 'sybct.max_links': -1,
  2106. 'sybct.min_server_severity': 10,
  2107. 'sybct.min_client_severity': 10
  2108. },
  2109. 'bcmath': {
  2110. 'bcmath.scale': 0
  2111. },
  2112. 'Session': {
  2113. 'session.save_handler': 'files',
  2114. 'session.use_strict_mode': 0,
  2115. 'session.use_cookies': 1,
  2116. 'session.use_only_cookies': 1,
  2117. 'session.name': 'PHPSESSID',
  2118. 'session.auto_start': 0,
  2119. 'session.cookie_lifetime': 0,
  2120. 'session.cookie_path': '/',
  2121. 'session.serialize_handler': 'php',
  2122. 'session.gc_probability': 0,
  2123. 'session.gc_divisor': 1000,
  2124. 'session.gc_maxlifetime': 1440,
  2125. 'session.bug_compat_42': 'Off',
  2126. 'session.bug_compat_warn': 'Off',
  2127. 'session.cache_limiter': 'nocache',
  2128. 'session.cache_expire': '180',
  2129. 'session.use_trans_sid': 0,
  2130. 'session.hash_function': 0,
  2131. 'session.hash_bits_per_character': 5,
  2132. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  2133. },
  2134. 'MSSQL': {
  2135. 'mssql.allow_persistent': 'On',
  2136. 'mssql.max_persistent': -1,
  2137. 'mssql.max_links': -1,
  2138. 'mssql.min_error_severity': 10,
  2139. 'mssql.min_message_severity': 10,
  2140. 'mssql.compatibility_mode': 'Off',
  2141. 'mssql.secure_connection': 'Off'
  2142. },
  2143. 'Tidy': {
  2144. 'tidy.clean_output': 'Off'
  2145. },
  2146. 'soap': {
  2147. 'soap.wsdl_cache_enabled': 1,
  2148. 'soap.wsdl_cache_dir': '"/tmp"',
  2149. 'soap.wsdl_cache_ttl': 86400,
  2150. 'soap.wsdl_cache_limit': 5
  2151. },
  2152. 'ldap': {
  2153. 'ldap.max_links': -1
  2154. },
  2155. },
  2156. },
  2157. }, merge=True) %}
  2158. {%- endif %}
  2159. {%- endif %}
  2160. {%- elif salt['grains.get']('os') == "Debian" %}
  2161. {%- if phpng_version|string == '5' %}
  2162. {%- set confdir = '/etc/php5' %}
  2163. {%- else %}
  2164. {%- set confdir = '/etc/php/' + phpng_version %}
  2165. {%- endif %}
  2166. {%- set php = salt['pillar.get']('php:ng', {
  2167. 'lookup': salt['grains.filter_by']({
  2168. 'Debian': {
  2169. 'pkgs': {
  2170. 'adodb': 'libphp-adodb',
  2171. 'apache2': 'libapache2-mod-php' + phpng_version,
  2172. 'apc': 'php-apcu',
  2173. 'apcu': 'php-apcu-bc',
  2174. 'bcmath': 'php' + phpng_version + '-bcmath',
  2175. 'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev', 'pkg-config', 'libsslcommon2-dev', 'gcc', 'make', 'autoconf', 'libc-dev', 'pkg-config'],
  2176. 'cache-lite': 'php-cache-lite',
  2177. 'cgi': 'php' + phpng_version + '-cgi',
  2178. 'cli': 'php' + phpng_version + '-cli',
  2179. 'composer_bin': 'composer',
  2180. 'console-table': 'php-console-table',
  2181. 'curl': 'php' + phpng_version + '-curl',
  2182. 'dev': 'php' + phpng_version + '-dev',
  2183. 'ext_conf_path': '/etc/php/' + phpng_version + '/mods-available',
  2184. 'fpm': 'php' + phpng_version + '-fpm',
  2185. 'gd': 'php' + phpng_version + '-gd',
  2186. 'gearman': 'php-gearman',
  2187. 'geoip': 'php-geoip',
  2188. 'geshi': 'php-geshi',
  2189. 'gettext': 'php' + phpng_version,
  2190. 'gmp': 'php' + phpng_version + '-gmp',
  2191. 'hhvm': 'hhvm',
  2192. 'imagick': 'php-imagick',
  2193. 'imap': 'php' + phpng_version + '-imap',
  2194. 'intl': 'php' + phpng_version + '-intl',
  2195. 'json': 'php' + phpng_version + '-json',
  2196. 'ldap': 'php' + phpng_version + '-ldap',
  2197. 'local_bin': '/usr/local/bin',
  2198. 'auth-sasl': 'php-auth-sasl',
  2199. 'mail': 'php-mail',
  2200. 'mbstring': 'php' + phpng_version + '-mbstring',
  2201. 'mcrypt': 'php' + phpng_version + '-mcrypt',
  2202. 'memcache': 'php-memcache',
  2203. 'memcached': 'php-memcached',
  2204. 'mongo': 'php-mongo',
  2205. 'mongodb': 'php-mongodb',
  2206. 'mysql': 'php' + phpng_version + '-mysql',
  2207. 'mysqlnd': 'php' + phpng_version + '-mysql',
  2208. 'net-smtp': 'php-net-smtp',
  2209. 'net4': 'php-net-ipv4',
  2210. 'net6': 'php-net-ipv6',
  2211. 'oauth': 'php-oauth',
  2212. 'opcache': 'php' + phpng_version + '-opcache',
  2213. 'pear': 'php-pear',
  2214. 'pgsql': 'php' + phpng_version + '-pgsql',
  2215. 'php': 'php' + phpng_version,
  2216. 'phpenmod_command': 'phpenmod -v' + phpng_version,
  2217. 'pspell': 'php' + phpng_version + '-pspell',
  2218. 'redis': 'php-redis',
  2219. 'seclib': ['php-phpseclib', 'php-seclib'],
  2220. 'snmp': 'php' + phpng_version + '-snmp',
  2221. 'soap': 'php' + phpng_version + '-soap',
  2222. 'ssh2': 'php-ssh2',
  2223. 'sqlite': 'php' + phpng_version + '-sqlite3',
  2224. 'suhosin5_ext': 'suhosin.so',
  2225. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  2226. 'suhosin7_ext': 'suhosin7.so',
  2227. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  2228. 'sybase': 'php' + phpng_version + '-sybase',
  2229. 'tcpdf': 'php-tcpdf',
  2230. 'temp_dir': '/tmp',
  2231. 'tidy': 'php' + phpng_version + '-tidy',
  2232. 'xdebug': 'php' + phpng_version + '-xdebug',
  2233. 'xml': 'php' + phpng_version + '-xml',
  2234. 'xsl': 'php' + phpng_version + '-xsl',
  2235. 'zip': 'php' + phpng_version + '-zip',
  2236. },
  2237. 'fpm': {
  2238. 'conf': confdir + '/fpm/php-fpm.conf',
  2239. 'ini': confdir + '/fpm/php.ini',
  2240. 'pools': confdir + '/fpm/pool.d',
  2241. 'service': 'php' + phpng_version + '-fpm',
  2242. 'defaults': odict([
  2243. ('global', odict([
  2244. ('pid', '/var/run/php' + phpng_version + '-fpm.pid'),
  2245. ('error_log', '/var/log/php' + phpng_version + '-fpm.log'),
  2246. ])),
  2247. ('include', confdir + '/fpm/pool.d/*.conf'),
  2248. ]),
  2249. },
  2250. 'hhvm': {
  2251. 'conf': '/etc/hhvm/server.ini',
  2252. 'ini': '/etc/hhvm/php.ini',
  2253. 'service': 'hhvm',
  2254. 'defaults': {},
  2255. 'server': odict([
  2256. ('pid', '/var/run/hhvm/pid'),
  2257. ('hhvm.server.port', '9000'),
  2258. ('hhvm.server.type', 'fastcgi'),
  2259. ('hhvm.server.default_document', 'index.php'),
  2260. ('hhvm.log.use_log_file', 'true'),
  2261. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  2262. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  2263. ]),
  2264. 'php': odict([
  2265. ('session.save_handler', 'files'),
  2266. ('session.save_path', '/var/lib/hhvm/sessions'),
  2267. ('session.gc_maxlifetime', '1440'),
  2268. ('hhvm.log.level', 'Warning'),
  2269. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  2270. ('hhvm.log.runtime_error_reporting_level', '8191'),
  2271. ('hhvm.mysql.typed_results', 'false'),
  2272. ]),
  2273. },
  2274. 'cli': {
  2275. 'ini': confdir + '/cli/php.ini',
  2276. },
  2277. 'apache2': {
  2278. 'ini': confdir + '/apache2/php.ini',
  2279. },
  2280. },
  2281. }),
  2282. 'fpm': {
  2283. 'service': {
  2284. 'enabled': True,
  2285. 'opts': {},
  2286. },
  2287. 'config': {
  2288. 'ini': {
  2289. 'opts': {},
  2290. 'settings': {},
  2291. },
  2292. 'conf': {
  2293. 'opts': {},
  2294. 'settings': {},
  2295. },
  2296. },
  2297. 'pools': {},
  2298. },
  2299. 'hhvm': {
  2300. 'service': {
  2301. 'enabled': True,
  2302. 'opts': {},
  2303. },
  2304. 'config': {
  2305. 'server': {
  2306. 'opts': {},
  2307. 'settings': {},
  2308. },
  2309. 'php': {
  2310. 'opts': {},
  2311. 'settings': {},
  2312. },
  2313. },
  2314. },
  2315. 'cli': {
  2316. 'ini': {
  2317. 'opts': {},
  2318. 'settings': {},
  2319. }
  2320. },
  2321. 'apache2': {
  2322. 'ini': {
  2323. 'opts': {},
  2324. 'settings': {},
  2325. }
  2326. },
  2327. 'ini': {
  2328. 'defaults': {
  2329. 'PHP': {
  2330. 'allow_url_fopen': 'On',
  2331. 'allow_url_include': 'Off',
  2332. 'asp_tags': 'Off',
  2333. 'auto_globals_jit': 'On',
  2334. 'default_mimetype': '"text/html"',
  2335. 'default_socket_timeout': 60,
  2336. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  2337. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  2338. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  2339. 'display_errors': 'Off',
  2340. 'display_startup_errors': 'Off',
  2341. 'enable_dl': 'Off',
  2342. 'engine': 'On',
  2343. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  2344. 'expose_php': 'On',
  2345. 'file_uploads': 'On',
  2346. 'html_errors': 'On',
  2347. 'ignore_repeated_errors': 'Off',
  2348. 'ignore_repeated_source': 'Off',
  2349. 'implicit_flush': 'Off',
  2350. 'log_errors': 'On',
  2351. 'log_errors_max_len': 1024,
  2352. 'max_execution_time': 30,
  2353. 'max_file_uploads': 20,
  2354. 'max_input_nesting_level': 64,
  2355. 'max_input_time': 60,
  2356. 'max_input_vars': 1000,
  2357. 'memory_limit': '128M',
  2358. 'output_buffering': 4096,
  2359. 'post_max_size': '8M',
  2360. 'precision': 14,
  2361. 'register_argc_argv': 'Off',
  2362. 'report_memleaks': 'On',
  2363. 'request_order': 'GP',
  2364. 'serialize_precision': 17,
  2365. 'short_open_tag': 'Off',
  2366. 'track_errors': 'Off',
  2367. 'upload_max_filesize': '2M',
  2368. 'variables_order': 'GPCS',
  2369. 'zend.enable_gc': 'On',
  2370. 'zlib.output_compression': 'Off',
  2371. },
  2372. 'CLI Server': {
  2373. 'cli_server.color': 'On'
  2374. },
  2375. 'Date': {
  2376. 'date.timezone': 'America/New_York'
  2377. },
  2378. 'Pdo_mysql': {
  2379. 'pdo_mysql.cache_size': 2000
  2380. },
  2381. 'mail function': {
  2382. 'SMTP': 'localhost',
  2383. 'mail.add_x_header': 'On'
  2384. },
  2385. 'SQL': {
  2386. 'sql.safe_mode': 'Off'
  2387. },
  2388. 'ODBC': {
  2389. 'odbc.allow_persistent': 'On',
  2390. 'odbc.check_persistent': 'On',
  2391. 'odbc.max_persistent': '-1',
  2392. 'odbc.max_links': '-1',
  2393. 'odbc.defaultlrl': 4096,
  2394. 'odbc.defaultbinmode': 1
  2395. },
  2396. 'Interbase': {
  2397. 'ibase.allow_persistent': 1,
  2398. 'ibase.max_persistent': -1,
  2399. 'ibase.max_links': -1,
  2400. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  2401. 'ibase.dateformat': '"%Y-%m-%d"',
  2402. 'ibase.timeformat': '"%H:%M:%S"'
  2403. },
  2404. 'MySQL': {
  2405. 'mysql.allow_local_infile': 'On',
  2406. 'mysql.allow_persistent': 'On',
  2407. 'mysql.cache_size': '2000',
  2408. 'mysql.max_persistent': -1,
  2409. 'mysql.max_links': -1,
  2410. 'mysql.connect_timeout': 60,
  2411. 'mysql.trace_mode': 'Off'
  2412. },
  2413. 'MySQLi': {
  2414. 'mysqli.max_persistent': -1,
  2415. 'mysqli.allow_persistent': 'On',
  2416. 'mysqli.max_links': -1,
  2417. 'mysqli.cache_size': 2000,
  2418. 'mysqli.default_port': 3306,
  2419. 'mysqli.reconnect': 'Off'
  2420. },
  2421. 'mysqlnd': {
  2422. 'mysqlnd.collect_statistics': 'On',
  2423. 'mysqlnd.collect_memory_statistics': 'Off'
  2424. },
  2425. 'PostgreSQL': {
  2426. 'pgsql.allow_persistent': 'On',
  2427. 'pgsql.auto_reset_persistent': 'Off',
  2428. 'pgsql.max_persistent': -1,
  2429. 'pgsql.max_links': -1,
  2430. 'pgsql.ignore_notice': 0,
  2431. 'pgsql.log_notice': 0
  2432. },
  2433. 'Sybase-CT': {
  2434. 'sybct.allow_persistent': 'On',
  2435. 'sybct.max_persistent': -1,
  2436. 'sybct.max_links': -1,
  2437. 'sybct.min_server_severity': 10,
  2438. 'sybct.min_client_severity': 10
  2439. },
  2440. 'bcmath': {
  2441. 'bcmath.scale': 0
  2442. },
  2443. 'Session': {
  2444. 'session.save_handler': 'files',
  2445. 'session.use_strict_mode': 0,
  2446. 'session.use_cookies': 1,
  2447. 'session.use_only_cookies': 1,
  2448. 'session.name': 'PHPSESSID',
  2449. 'session.auto_start': 0,
  2450. 'session.cookie_lifetime': 0,
  2451. 'session.cookie_path': '/',
  2452. 'session.serialize_handler': 'php',
  2453. 'session.gc_probability': 0,
  2454. 'session.gc_divisor': 1000,
  2455. 'session.gc_maxlifetime': 1440,
  2456. 'session.bug_compat_42': 'Off',
  2457. 'session.bug_compat_warn': 'Off',
  2458. 'session.cache_limiter': 'nocache',
  2459. 'session.cache_expire': '180',
  2460. 'session.use_trans_sid': 0,
  2461. 'session.hash_function': 0,
  2462. 'session.hash_bits_per_character': 5,
  2463. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  2464. },
  2465. 'MSSQL': {
  2466. 'mssql.allow_persistent': 'On',
  2467. 'mssql.max_persistent': -1,
  2468. 'mssql.max_links': -1,
  2469. 'mssql.min_error_severity': 10,
  2470. 'mssql.min_message_severity': 10,
  2471. 'mssql.compatibility_mode': 'Off',
  2472. 'mssql.secure_connection': 'Off'
  2473. },
  2474. 'Tidy': {
  2475. 'tidy.clean_output': 'Off'
  2476. },
  2477. 'soap': {
  2478. 'soap.wsdl_cache_enabled': 1,
  2479. 'soap.wsdl_cache_dir': '"/tmp"',
  2480. 'soap.wsdl_cache_ttl': 86400,
  2481. 'soap.wsdl_cache_limit': 5
  2482. },
  2483. 'ldap': {
  2484. 'ldap.max_links': -1
  2485. },
  2486. },
  2487. },
  2488. }, merge=True) %}
  2489. {%- else %}
  2490. {%- set useversion = phpng_version | replace(".", "-") -%}
  2491. {#- Red Hat Softwarecollection prefix lookup belongs to the Red Hat part
  2492. further down but has to go here due to Jinja parsing rules. -#}
  2493. {%- if salt['pillar.get']('php:use_scl_repo', False) -%}
  2494. {%- set rh_prefix = 'rh-php{}-'.format(salt['pillar.get']('php:scl_php_version', '')) -%}
  2495. {%- set sclo_prefix = 'sclo-php{}-'.format(salt['pillar.get']('php:scl_php_version', '')) -%}
  2496. {%- set path_suffix = 'opt/rh/rh-php{}/'.format(salt['pillar.get']('php:scl_php_version', '')) -%}
  2497. {%- else -%}
  2498. {%- set rh_prefix = '' -%}
  2499. {%- set sclo_prefix = '' -%}
  2500. {%- set path_suffix = '' -%}
  2501. {%- endif -%}
  2502. {%- set php = salt['pillar.get']('php:ng', {
  2503. 'lookup': salt['grains.filter_by']({
  2504. 'Debian': {
  2505. 'pkgs': {
  2506. 'adodb': 'php5-adodb',
  2507. 'apache2': 'libapache2-mod-php5',
  2508. 'apc': 'php-apc',
  2509. 'apcu': 'php5-apcu',
  2510. 'bcmath': 'php5',
  2511. 'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev'],
  2512. 'cache-lite': 'php-cache-lite',
  2513. 'cgi': 'php5-cgi',
  2514. 'cli': 'php5-cli',
  2515. 'console-table': 'php-console-table',
  2516. 'composer_bin': 'composer',
  2517. 'curl': 'php5-curl',
  2518. 'dev': ['php5-dev','build-essential'],
  2519. 'ext_conf_path': '/etc/php5/mods-available',
  2520. 'fpm': 'php5-fpm',
  2521. 'gd': 'php5-gd',
  2522. 'gearman': 'php5-gearman',
  2523. 'geoip': 'php5-geoip',
  2524. 'geshi': 'php-geshi',
  2525. 'gettext': 'php-gettext',
  2526. 'gmp': 'php5-gmp',
  2527. 'hhvm': 'hhvm',
  2528. 'imagick': 'php5-imagick',
  2529. 'imap': 'php5-imap',
  2530. 'intl': 'php5-intl',
  2531. 'json': 'php5-json',
  2532. 'ldap': 'php5-ldap',
  2533. 'local_bin': '/usr/local/bin',
  2534. 'auth-sasl': 'php-auth-sasl',
  2535. 'mail': 'php-mail',
  2536. 'mbstring': 'php5',
  2537. 'mcrypt': 'php5-mcrypt',
  2538. 'mdb2': 'php-mdb2',
  2539. 'mdb2-driver-mysql': 'php-mdb2-driver-mysql',
  2540. 'mdb2-driver-pgsql': 'php-mdb2-driver-pgsql',
  2541. 'memcache': 'php5-memcache',
  2542. 'memcached': 'php5-memcached',
  2543. 'mysql': 'php5-mysql',
  2544. 'mysqlnd': 'php5-mysqlnd',
  2545. 'net-smtp': 'php-net-smtp',
  2546. 'net4': 'php-net-ipv4',
  2547. 'net6': 'php-net-ipv6',
  2548. 'oauth': 'php5-oauth',
  2549. 'opcache': 'php5',
  2550. 'pear': 'php-pear',
  2551. 'pgsql': 'php5-pgsql',
  2552. 'php': 'php5',
  2553. 'phpenmod_command': 'php5enmod',
  2554. 'pspell': 'php5-pspell',
  2555. 'redis': 'php5-redis',
  2556. 'seclib': 'php-seclib',
  2557. 'snmp': 'php5-snmp',
  2558. 'soap': 'php-soap',
  2559. 'sqlite': 'php5-sqlite',
  2560. 'ssh2': 'php5-ssh2',
  2561. 'suhosin5_ext': 'suhosin.so',
  2562. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  2563. 'suhosin7_ext': 'suhosin7.so',
  2564. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  2565. 'svn': 'php5-svn',
  2566. 'sybase': 'php5-sybase',
  2567. 'tcpdf': 'php-tcpdf',
  2568. 'temp_dir': '/tmp',
  2569. 'tidy': 'php5-tidy',
  2570. 'uuid': 'php-uuid',
  2571. 'xcache': 'php5-xcache',
  2572. 'xdebug': 'php5-xdebug',
  2573. 'xml': 'php5',
  2574. 'xsl': 'php5-xsl',
  2575. 'zip': 'php5',
  2576. },
  2577. 'fpm': {
  2578. 'conf': '/etc/php5/fpm/php-fpm.conf',
  2579. 'ini': '/etc/php5/fpm/php.ini',
  2580. 'pools': '/etc/php5/fpm/pool.d',
  2581. 'service': 'php5-fpm',
  2582. 'defaults': odict([
  2583. ('global', odict([
  2584. ('pid', '/var/run/php5-fpm.pid'),
  2585. ('error_log', '/var/log/php5-fpm.log'),
  2586. ])),
  2587. ('include', '/etc/php5/fpm/pool.d/*.conf'),
  2588. ]),
  2589. },
  2590. 'hhvm': {
  2591. 'conf': '/etc/hhvm/server.ini',
  2592. 'ini': '/etc/hhvm/php.ini',
  2593. 'service': 'hhvm',
  2594. 'defaults': {},
  2595. 'server': odict([
  2596. ('pid', '/var/run/hhvm/pid'),
  2597. ('hhvm.server.port', '9000'),
  2598. ('hhvm.server.type', 'fastcgi'),
  2599. ('hhvm.server.default_document', 'index.php'),
  2600. ('hhvm.log.use_log_file', 'true'),
  2601. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  2602. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  2603. ]),
  2604. 'php': odict([
  2605. ('session.save_handler', 'files'),
  2606. ('session.save_path', '/var/lib/hhvm/sessions'),
  2607. ('session.gc_maxlifetime', '1440'),
  2608. ('hhvm.log.level', 'Warning'),
  2609. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  2610. ('hhvm.log.runtime_error_reporting_level', '8191'),
  2611. ('hhvm.mysql.typed_results', 'false'),
  2612. ]),
  2613. },
  2614. 'cli': {
  2615. 'ini': '/etc/php5/cli/php.ini',
  2616. },
  2617. 'apache2': {
  2618. 'ini': '/etc/php5/apache2/php.ini',
  2619. },
  2620. 'xcache': {
  2621. 'ini': '/etc/php5/mods-available/xcache.ini',
  2622. 'defaults': {},
  2623. },
  2624. },
  2625. 'Gentoo' : {
  2626. 'pkgs': {
  2627. 'apache2': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[apache2]'}],
  2628. 'apc': [{'name': 'dev-php/pecl-apcu_bc','version': '[php_targets_php' + useversion + ']'}],
  2629. 'apcu': [{'name': 'dev-php/pecl-apcu','version': '[php_targets_php' + useversion + ']'}],
  2630. 'bcmath': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[bcmath]'}],
  2631. 'cache-lite': 'dev-php/PEAR-Cache_Lite',
  2632. 'cgi': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[cgi]'}],
  2633. 'cli': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[cli]'}],
  2634. 'composer_bin': 'composer',
  2635. 'console-table': 'dev-php/PEAR-Console_Table',
  2636. 'curl': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[curl]'}],
  2637. 'ext_conf_path': '/etc/php/fpm-php' + phpng_version + '/ext',
  2638. 'fpm': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[fpm]'}],
  2639. 'gd': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[gd]'}],
  2640. 'geoip': [{'name': 'dev-php/pecl-geoip','version': '[php_targets_php' + useversion + ']'}],
  2641. 'gettext': 'dev-php/PEAR-File_Gettext',
  2642. 'gmp': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[gmp]'}],
  2643. 'imagick': [{'name': 'dev-php/pecl-imagick','version': '[php_targets_php' + useversion + ']'}],
  2644. 'imap': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[imap]'}],
  2645. 'intl': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[intl]'}],
  2646. 'json': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[json]'}],
  2647. 'ldap': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[ldap]'}],
  2648. 'local_bin': '/usr/local/bin',
  2649. 'auth-sasl': 'dev-php/PEAR-Auth_SASL',
  2650. 'mail': 'dev-php/PHPMailer',
  2651. 'memcache': [{'name': 'dev-php/pecl-memcache','version': '[php_targets_php' + useversion + ']'}],
  2652. 'memcached': [{'name': 'dev-php/pecl-memcached','version': '[php_targets_php' + useversion + ']'}],
  2653. 'mongo': [{'name': 'dev-php/pecl-mongo','version': '[php_targets_php' + useversion + ']'}],
  2654. 'mongodb': [{'name': 'dev-php/pecl-mongodb','version': '[php_targets_php' + useversion + ']'}],
  2655. 'mysqlnd': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[mysql]'}],
  2656. 'mysql': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[mysqli]'}],
  2657. 'net-smtp': 'dev-php/PEAR-Net_SMTP',
  2658. 'net4': 'dev-php/PEAR-Net_IPv4',
  2659. 'net6': 'dev-php/PEAR-Net_IPv6',
  2660. 'oauth': [{'name': 'dev-php/pecl-oauth','version': '[php_targets_php' + useversion + ']'}],
  2661. 'opcache': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[opcache]'}],
  2662. 'pear': 'dev-php/pear',
  2663. 'pgsql': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[postgres]'}],
  2664. 'php': [{'name': 'dev-lang/php','version': ':' + phpng_version}],
  2665. 'pspell': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[spell]'}],
  2666. 'redis': [{'name': 'dev-php/pecl-redis','version': '[php_targets_php' + useversion + ']'}],
  2667. 'snmp': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[snmp]'}],
  2668. 'soap': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[soap]'}],
  2669. 'ssh2': [{'name': 'dev-php/pecl-ssh2','version': '[php_targets_php' + useversion + ']'}],
  2670. 'sqlite': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[sqlite]'}],
  2671. 'sybase': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[sybase-ct]'}],
  2672. 'tcpdf': 'dev-php/tcpdf',
  2673. 'temp_dir': '/tmp',
  2674. 'tidy': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[tidy]'}],
  2675. 'xdebug': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[debug]'}],
  2676. 'xml': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[xml]'}],
  2677. 'xsl': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[xslt]'}],
  2678. 'zip': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[zip]'}],
  2679. },
  2680. 'fpm': {
  2681. 'conf': '/etc/php/fpm-php' + phpng_version + '/php-fpm.conf',
  2682. 'ini': '/etc/php/fpm-php' + phpng_version + '/php.ini',
  2683. 'pools': '/etc/php/fpm-php' + phpng_version + '/fpm.d',
  2684. 'service': 'php-fpm',
  2685. 'defaults': odict([
  2686. ('global', odict([
  2687. ('pid', '/var/run/php-fpm-php' + phpng_version + '.pid'),
  2688. ('error_log', '/var/log/php' + phpng_version + '-fpm.log'),
  2689. ])),
  2690. ('include', '/etc/php/fpm-php' + phpng_version + '/fpm.d/*.conf'),
  2691. ]),
  2692. },
  2693. 'cli': {
  2694. 'ini': '/etc/php/cli-php' + phpng_version + '/php.ini',
  2695. },
  2696. 'apache2': {
  2697. 'ini': '/etc/php/apache2-php' + phpng_version + '/php.ini',
  2698. },
  2699. },
  2700. 'RedHat': {
  2701. 'pkgs': {
  2702. 'adodb': 'php-adodb',
  2703. 'apc': 'php-pecl-apc',
  2704. 'apcu': rh_prefix + 'php-pecl-apcu',
  2705. 'bcmath': rh_prefix + 'php-bcmath',
  2706. 'build_pkgs': ['openssl-devel', 'gcc'],
  2707. 'cache-lite': 'php-pear-Cache-Lite',
  2708. 'cgi': rh_prefix + 'php-cgi',
  2709. 'cli': rh_prefix + 'php-cli',
  2710. 'composer': 'composer',
  2711. 'composer_bin': 'composer',
  2712. 'console-table': 'php-pear-Console-Table',
  2713. 'curl': ['php-common', 'curl'],
  2714. 'dev': rh_prefix + 'php-devel',
  2715. 'ext_conf_path': '/etc/' + path_suffix + 'php.d',
  2716. 'fpm': rh_prefix + 'php-fpm',
  2717. 'gd': rh_prefix + 'php-gd',
  2718. 'geoip': sclo_prefix + 'php-pecl-geoip',
  2719. 'geshi': 'php-geshi',
  2720. 'gettext': 'php-php-gettext',
  2721. 'http': sclo_prefix + 'php-pecl-http',
  2722. 'imagick': sclo_prefix + 'php-pecl-imagick',
  2723. 'imap': sclo_prefix + 'php-imap',
  2724. 'intl': rh_prefix + 'php-intl',
  2725. 'json': rh_prefix + 'php-common',
  2726. 'ldap': rh_prefix + 'php-ldap',
  2727. 'local_bin': '/usr/local/bin',
  2728. 'auth-sasl': 'php-pear-Auth-SASL',
  2729. 'mail': 'php-pear-Mail',
  2730. 'mbstring': rh_prefix + 'php-mbstring',
  2731. 'mcrypt': sclo_prefix + 'php-mcrypt',
  2732. 'memcache': 'php-pecl-memcache',
  2733. 'memcached': sclo_prefix + 'php-pecl-memcached',
  2734. 'mysql': 'php-mysql',
  2735. 'mysqlnd': rh_prefix + 'php-mysqlnd',
  2736. 'net-smtp': 'php-pear-Net-SMTP',
  2737. 'net4': 'php-pear-Net-IPv4',
  2738. 'oauth': 'php-pecl-oauth',
  2739. 'opcache': 'php-pecl-zendopcache',
  2740. 'pear': rh_prefix + 'php-pear',
  2741. 'pgsql': rh_prefix + 'php-pgsql',
  2742. 'php': rh_prefix + 'php',
  2743. 'pspell': rh_prefix + 'php-pspell',
  2744. 'redis': sclo_prefix + 'php-pecl-redis',
  2745. 'seclib': 'php-phpseclib',
  2746. 'snmp': rh_prefix + 'php-snmp',
  2747. 'soap': rh_prefix + 'php-soap',
  2748. 'sqlite': rh_prefix + 'php-pdo',
  2749. 'ssh2': sclo_prefix + 'php-pecl-ssh2',
  2750. 'suhosin5_ext': 'suhosin.so',
  2751. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  2752. 'suhosin7_ext': 'suhosin7.so',
  2753. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  2754. 'tcpdf': 'php-tcpdf',
  2755. 'temp_dir': '/tmp',
  2756. 'tidy': sclo_prefix + 'php-tidy',
  2757. 'uuid': sclo_prefix + 'php-pecl-uuid',
  2758. 'xcache': 'php-xcache',
  2759. 'xdebug': sclo_prefix + 'php-pecl-xdebug',
  2760. 'xml': rh_prefix + 'php-xml',
  2761. 'xsl': rh_prefix + 'php-xml',
  2762. 'zip': rh_prefix + 'php',
  2763. },
  2764. 'fpm': {
  2765. 'conf': '/etc/' + path_suffix + 'php-fpm.conf',
  2766. 'ini': '/etc/' + path_suffix + 'php.ini',
  2767. 'pools': '/etc/' + path_suffix + 'php-fpm.d',
  2768. 'service': rh_prefix + 'php-fpm',
  2769. 'defaults': {
  2770. 'global': {
  2771. 'pid': '/var/' + path_suffix + 'run/php-fpm/php-fpm.pid',
  2772. 'error_log': '/var/' + path_suffix + 'log/php-fpm/error.log',
  2773. },
  2774. 'include': '/etc/' + path_suffix + 'php-fpm.d/*.conf',
  2775. },
  2776. },
  2777. 'cli': {
  2778. 'ini': '/etc/' + path_suffix + 'php.ini',
  2779. },
  2780. 'xcache': {
  2781. 'ini': '/etc/' + path_suffix + 'php.d/xcache.ini',
  2782. },
  2783. },
  2784. 'Suse': {
  2785. 'pkgs': {
  2786. 'adodb': 'php5-dba',
  2787. 'apache2': 'apache2-mod_php5',
  2788. 'cli': 'php5',
  2789. 'curl': 'php5-curl',
  2790. 'fpm': 'php5-fpm',
  2791. 'gd': 'php5-gd',
  2792. 'imap': 'php5-imap',
  2793. 'intl': 'php5-intl',
  2794. 'json': 'php5-json',
  2795. 'ldap': 'php5-ldap',
  2796. 'mbstring': 'php5-mbstring',
  2797. 'mcrypt': 'php5-mcrypt',
  2798. 'mysql': 'php5-mysql',
  2799. 'oauth': 'php5-oauth',
  2800. 'pear': 'php5-pear',
  2801. 'pgsql': 'php5-pgsql',
  2802. 'php': 'php5',
  2803. 'snmp': 'php5-snmp',
  2804. 'soap': 'php5-soap',
  2805. 'sqlite': 'php5-sqlite',
  2806. 'suhosin': 'php5-suhosin',
  2807. 'xml': ['php5-xmlreader','php5-xmlwriter','php5-xmlrpc'],
  2808. 'zip': 'php5-zip',
  2809. },
  2810. 'fpm': {
  2811. 'conf': '/etc/php-fpm.conf',
  2812. 'ini': '/etc/php.ini',
  2813. 'pools': '/etc/php-fpm.d',
  2814. 'service': 'php-fpm',
  2815. 'defaults': {
  2816. 'global': {
  2817. 'pid': '/var/run/php-fpm/php-fpm.pid',
  2818. 'error_log': '/var/log/php-fpm/error.log',
  2819. },
  2820. 'include': '/etc/php-fpm.d/*.conf',
  2821. },
  2822. },
  2823. 'cli': {
  2824. 'ini': '/etc/php.ini',
  2825. },
  2826. },
  2827. 'Arch': {
  2828. 'pkgs': {
  2829. 'apc': 'php-apcu',
  2830. 'apcu': 'php-apcu-bc',
  2831. 'cgi': 'php-cgi',
  2832. 'cli': 'php',
  2833. 'composer_bin': 'composer',
  2834. 'curl': 'curl',
  2835. 'fpm': 'php-fpm',
  2836. 'gd': 'php-gd',
  2837. 'geoip': 'php-geoip',
  2838. 'imap': 'php-imap',
  2839. 'intl': 'php-intl',
  2840. 'local_bin': '/usr/local/bin',
  2841. 'mcrypt': 'php-mcrypt',
  2842. 'memcache': 'php-memcache',
  2843. 'memcached': 'php-memcached',
  2844. 'pgsql': 'php-pgsql',
  2845. 'php': 'php',
  2846. 'pspell': 'php-pspell',
  2847. 'snmp': 'php-snmp',
  2848. 'sqlite': 'php-sqlite',
  2849. 'temp_dir': '/tmp',
  2850. 'tidy': 'php-tidy',
  2851. 'xcache': 'php-xcache',
  2852. 'xdebug': 'xdebug',
  2853. 'xsl': 'php-xsl',
  2854. },
  2855. 'fpm': {
  2856. 'conf': '/etc/php/php-fpm.conf',
  2857. 'ini': '/etc/php/php.ini',
  2858. 'pools': '/etc/php/fpm.d',
  2859. 'service': 'php-fpm',
  2860. 'defaults': {
  2861. 'global': {
  2862. 'pid': '/run/php-fpm/php-fpm.pid',
  2863. 'error_log': 'log/php-fpm.log',
  2864. },
  2865. 'include': '/etc/php/fpm.d/*.conf',
  2866. },
  2867. },
  2868. 'cli': {
  2869. 'ini': '/etc/php/php-cli.ini',
  2870. },
  2871. 'xcache': {
  2872. 'ini': '/etc/php/conf.d/xcache.ini',
  2873. },
  2874. },
  2875. 'FreeBSD': {
  2876. 'apache2': {
  2877. 'ini': '/usr/local/etc/php.ini',
  2878. 'module_config': '/usr/local/etc/apache24/modules.d/050_mod_php.conf',
  2879. 'name': 'apache24',
  2880. },
  2881. 'cli': {
  2882. 'ini': '/usr/local/etc/php.ini'
  2883. },
  2884. 'pkgs': {
  2885. 'apache2': 'mod_php' + freebsd_phpng_version,
  2886. 'composer_bin': 'composer',
  2887. 'cli': 'php' + freebsd_phpng_version,
  2888. 'ctype': 'php' + freebsd_phpng_version + '-ctype',
  2889. 'curl': 'php' + freebsd_phpng_version + '-curl',
  2890. 'filter': 'php' + freebsd_phpng_version + '-filter',
  2891. 'gd': 'php' + freebsd_phpng_version + '-gd',
  2892. 'hash': 'php' + freebsd_phpng_version + '-hash',
  2893. 'json': 'php' + freebsd_phpng_version + '-json',
  2894. 'local_bin': '/usr/local/bin',
  2895. 'mbstring': 'php' + freebsd_phpng_version + '-mbstring',
  2896. 'mcrypt': 'php' + freebsd_phpng_version + '-mcrypt',
  2897. 'mysql': 'php' + freebsd_phpng_version + '-mysqli',
  2898. 'openssl': 'php' + freebsd_phpng_version + '-openssl',
  2899. 'php': 'php' + freebsd_phpng_version,
  2900. 'phar': 'php' + freebsd_phpng_version + '-phar',
  2901. 'posix': 'php' + freebsd_phpng_version + '-posix',
  2902. 'session': 'php' + freebsd_phpng_version + '-session',
  2903. 'snmp': 'php' + freebsd_phpng_version + '-snmp',
  2904. 'temp_dir': '/tmp',
  2905. 'xml': 'php' + freebsd_phpng_version + '-xml',
  2906. 'zip': 'php' + freebsd_phpng_version + '-zip',
  2907. },
  2908. },
  2909. }),
  2910. 'fpm': {
  2911. 'service': {
  2912. 'enabled': True,
  2913. 'opts': {},
  2914. },
  2915. 'config': {
  2916. 'ini': {
  2917. 'opts': {},
  2918. 'settings': {},
  2919. },
  2920. 'conf': {
  2921. 'opts': {},
  2922. 'settings': {},
  2923. },
  2924. },
  2925. 'pools': {
  2926. 'default.conf': {
  2927. 'enabled': False,
  2928. 'opts': {},
  2929. },
  2930. },
  2931. },
  2932. 'hhvm': {
  2933. 'service': {
  2934. 'enabled': True,
  2935. 'opts': {},
  2936. },
  2937. 'config': {
  2938. 'server': {
  2939. 'opts': {},
  2940. 'settings': {},
  2941. },
  2942. 'php': {
  2943. 'opts': {},
  2944. 'settings': {},
  2945. },
  2946. },
  2947. },
  2948. 'cli': {
  2949. 'ini': {
  2950. 'opts': {},
  2951. 'settings': {},
  2952. }
  2953. },
  2954. 'apache2': {
  2955. 'ini': {
  2956. 'opts': {},
  2957. 'settings': {},
  2958. }
  2959. },
  2960. 'xcache': {
  2961. 'ini': {
  2962. 'defaults': {
  2963. 'xcache-common': {
  2964. 'extension': 'xcache.so',
  2965. },
  2966. 'xcache.admin': {
  2967. 'xcache.admin.enable_auth': 'On',
  2968. },
  2969. 'xcache': {
  2970. 'xcache.shm_scheme': '"mmap"',
  2971. 'xcache.size': '60M',
  2972. 'xcache.count': '1',
  2973. 'xcache.slots': '8K',
  2974. 'xcache.ttl': '0',
  2975. 'xcache.gc_interval': '0',
  2976. 'xcache.var_size': '4M',
  2977. 'xcache.var_count': '1',
  2978. 'xcache.var_slots': '8K',
  2979. 'xcache.var_ttl': '0',
  2980. 'xcache.var_maxttl': '0',
  2981. 'xcache.var_gc_interval': '300',
  2982. 'xcache.var_namespace_mode': '0',
  2983. 'xcache.var_namespace': '""',
  2984. 'xcache.readonly_protection': 'Off',
  2985. 'xcache.mmap_path': '"/dev/zero"',
  2986. 'xcache.coredump_directory': '""',
  2987. 'xcache.coredump_type': '0',
  2988. 'xcache.disable_on_crash': 'Off',
  2989. 'xcache.experimental': 'Off',
  2990. 'xcache.cacher': 'On',
  2991. 'xcache.stat': 'On',
  2992. 'xcache.optimizer': 'Off',
  2993. },
  2994. 'xcache.coverager': {
  2995. 'xcache.coverager': 'Off',
  2996. 'xcache.coverager_autostart': 'On',
  2997. 'xcache.coveragedump_directory': '""',
  2998. },
  2999. },
  3000. 'opts': {},
  3001. 'settings': {},
  3002. }
  3003. },
  3004. 'ini': {
  3005. 'defaults': {
  3006. 'PHP': {
  3007. 'engine': 'On',
  3008. 'allow_url_fopen': 'On',
  3009. 'allow_url_include': 'Off',
  3010. 'asp_tags': 'Off',
  3011. 'auto_globals_jit': 'On',
  3012. 'default_mimetype': '"text/html"',
  3013. 'default_socket_timeout': 60,
  3014. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  3015. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  3016. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  3017. 'display_errors': 'Off',
  3018. 'display_startup_errors': 'Off',
  3019. 'enable_dl': 'Off',
  3020. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  3021. 'expose_php': 'On',
  3022. 'file_uploads': 'On',
  3023. 'html_errors': 'On',
  3024. 'ignore_repeated_errors': 'Off',
  3025. 'ignore_repeated_source': 'Off',
  3026. 'implicit_flush': 'Off',
  3027. 'log_errors': 'On',
  3028. 'log_errors_max_len': 1024,
  3029. 'max_execution_time': 30,
  3030. 'max_file_uploads': 20,
  3031. 'max_input_nesting_level': 64,
  3032. 'max_input_time': 60,
  3033. 'max_input_vars': 1000,
  3034. 'memory_limit': '128M',
  3035. 'output_buffering': 4096,
  3036. 'post_max_size': '8M',
  3037. 'precision': 14,
  3038. 'register_argc_argv': 'Off',
  3039. 'report_memleaks': 'On',
  3040. 'request_order': 'GP',
  3041. 'serialize_precision': 17,
  3042. 'short_open_tag': 'Off',
  3043. 'track_errors': 'Off',
  3044. 'upload_max_filesize': '2M',
  3045. 'variables_order': 'GPCS',
  3046. 'zend.enable_gc': 'On',
  3047. 'zlib.output_compression': 'Off',
  3048. },
  3049. 'CLI Server': {
  3050. 'cli_server.color': 'On'
  3051. },
  3052. 'Date': {
  3053. 'date.timezone': 'America/New_York'
  3054. },
  3055. 'Pdo_mysql': {
  3056. 'pdo_mysql.cache_size': 2000
  3057. },
  3058. 'mail function': {
  3059. 'SMTP': 'localhost',
  3060. 'mail.add_x_header': 'On'
  3061. },
  3062. 'SQL': {
  3063. 'sql.safe_mode': 'Off'
  3064. },
  3065. 'ODBC': {
  3066. 'odbc.allow_persistent': 'On',
  3067. 'odbc.check_persistent': 'On',
  3068. 'odbc.max_persistent': '-1',
  3069. 'odbc.max_links': '-1',
  3070. 'odbc.defaultlrl': 4096,
  3071. 'odbc.defaultbinmode': 1
  3072. },
  3073. 'Interbase': {
  3074. 'ibase.allow_persistent': 1,
  3075. 'ibase.max_persistent': -1,
  3076. 'ibase.max_links': -1,
  3077. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  3078. 'ibase.dateformat': '"%Y-%m-%d"',
  3079. 'ibase.timeformat': '"%H:%M:%S"'
  3080. },
  3081. 'MySQL': {
  3082. 'mysql.allow_local_infile': 'On',
  3083. 'mysql.allow_persistent': 'On',
  3084. 'mysql.cache_size': '2000',
  3085. 'mysql.max_persistent': -1,
  3086. 'mysql.max_links': -1,
  3087. 'mysql.connect_timeout': 60,
  3088. 'mysql.trace_mode': 'Off'
  3089. },
  3090. 'MySQLi': {
  3091. 'mysqli.max_persistent': -1,
  3092. 'mysqli.allow_persistent': 'On',
  3093. 'mysqli.max_links': -1,
  3094. 'mysqli.cache_size': 2000,
  3095. 'mysqli.default_port': 3306,
  3096. 'mysqli.reconnect': 'Off'
  3097. },
  3098. 'mysqlnd': {
  3099. 'mysqlnd.collect_statistics': 'On',
  3100. 'mysqlnd.collect_memory_statistics': 'Off'
  3101. },
  3102. 'PostgreSQL': {
  3103. 'pgsql.allow_persistent': 'On',
  3104. 'pgsql.auto_reset_persistent': 'Off',
  3105. 'pgsql.max_persistent': -1,
  3106. 'pgsql.max_links': -1,
  3107. 'pgsql.ignore_notice': 0,
  3108. 'pgsql.log_notice': 0
  3109. },
  3110. 'Sybase-CT': {
  3111. 'sybct.allow_persistent': 'On',
  3112. 'sybct.max_persistent': -1,
  3113. 'sybct.max_links': -1,
  3114. 'sybct.min_server_severity': 10,
  3115. 'sybct.min_client_severity': 10
  3116. },
  3117. 'bcmath': {
  3118. 'bcmath.scale': 0
  3119. },
  3120. 'Session': {
  3121. 'session.save_handler': 'files',
  3122. 'session.use_strict_mode': 0,
  3123. 'session.use_cookies': 1,
  3124. 'session.use_only_cookies': 1,
  3125. 'session.name': 'PHPSESSID',
  3126. 'session.auto_start': 0,
  3127. 'session.cookie_lifetime': 0,
  3128. 'session.cookie_path': '/',
  3129. 'session.serialize_handler': 'php',
  3130. 'session.gc_probability': 0,
  3131. 'session.gc_divisor': 1000,
  3132. 'session.gc_maxlifetime': 1440,
  3133. 'session.bug_compat_42': 'Off',
  3134. 'session.bug_compat_warn': 'Off',
  3135. 'session.cache_limiter': 'nocache',
  3136. 'session.cache_expire': '180',
  3137. 'session.use_trans_sid': 0,
  3138. 'session.hash_function': 0,
  3139. 'session.hash_bits_per_character': 5,
  3140. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  3141. },
  3142. 'MSSQL': {
  3143. 'mssql.allow_persistent': 'On',
  3144. 'mssql.max_persistent': -1,
  3145. 'mssql.max_links': -1,
  3146. 'mssql.min_error_severity': 10,
  3147. 'mssql.min_message_severity': 10,
  3148. 'mssql.compatibility_mode': 'Off',
  3149. 'mssql.secure_connection': 'Off'
  3150. },
  3151. 'Tidy': {
  3152. 'tidy.clean_output': 'Off'
  3153. },
  3154. 'soap': {
  3155. 'soap.wsdl_cache_enabled': 1,
  3156. 'soap.wsdl_cache_dir': '"/tmp"',
  3157. 'soap.wsdl_cache_ttl': 86400,
  3158. 'soap.wsdl_cache_limit': 5
  3159. },
  3160. 'ldap': {
  3161. 'ldap.max_links': -1
  3162. },
  3163. },
  3164. },
  3165. }, merge=True) %}
  3166. {%- endif %}