Saltstack Official PHP Formula
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

3158 Zeilen
152KB

  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. {%- set php = salt['pillar.get']('php:ng', {
  2492. 'lookup': salt['grains.filter_by']({
  2493. 'Debian': {
  2494. 'pkgs': {
  2495. 'adodb': 'php5-adodb',
  2496. 'apache2': 'libapache2-mod-php5',
  2497. 'apc': 'php-apc',
  2498. 'apcu': 'php5-apcu',
  2499. 'bcmath': 'php5',
  2500. 'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev'],
  2501. 'cache-lite': 'php-cache-lite',
  2502. 'cgi': 'php5-cgi',
  2503. 'cli': 'php5-cli',
  2504. 'console-table': 'php-console-table',
  2505. 'composer_bin': 'composer',
  2506. 'curl': 'php5-curl',
  2507. 'dev': ['php5-dev','build-essential'],
  2508. 'ext_conf_path': '/etc/php5/mods-available',
  2509. 'fpm': 'php5-fpm',
  2510. 'gd': 'php5-gd',
  2511. 'gearman': 'php5-gearman',
  2512. 'geoip': 'php5-geoip',
  2513. 'geshi': 'php-geshi',
  2514. 'gettext': 'php-gettext',
  2515. 'gmp': 'php5-gmp',
  2516. 'hhvm': 'hhvm',
  2517. 'imagick': 'php5-imagick',
  2518. 'imap': 'php5-imap',
  2519. 'intl': 'php5-intl',
  2520. 'json': 'php5-json',
  2521. 'ldap': 'php5-ldap',
  2522. 'local_bin': '/usr/local/bin',
  2523. 'auth-sasl': 'php-auth-sasl',
  2524. 'mail': 'php-mail',
  2525. 'mbstring': 'php5',
  2526. 'mcrypt': 'php5-mcrypt',
  2527. 'mdb2': 'php-mdb2',
  2528. 'mdb2-driver-mysql': 'php-mdb2-driver-mysql',
  2529. 'mdb2-driver-pgsql': 'php-mdb2-driver-pgsql',
  2530. 'memcache': 'php5-memcache',
  2531. 'memcached': 'php5-memcached',
  2532. 'mysql': 'php5-mysql',
  2533. 'mysqlnd': 'php5-mysqlnd',
  2534. 'net-smtp': 'php-net-smtp',
  2535. 'net4': 'php-net-ipv4',
  2536. 'net6': 'php-net-ipv6',
  2537. 'oauth': 'php5-oauth',
  2538. 'opcache': 'php5',
  2539. 'pear': 'php-pear',
  2540. 'pgsql': 'php5-pgsql',
  2541. 'php': 'php5',
  2542. 'phpenmod_command': 'php5enmod',
  2543. 'pspell': 'php5-pspell',
  2544. 'redis': 'php5-redis',
  2545. 'seclib': 'php-seclib',
  2546. 'snmp': 'php5-snmp',
  2547. 'soap': 'php-soap',
  2548. 'sqlite': 'php5-sqlite',
  2549. 'ssh2': 'php5-ssh2',
  2550. 'suhosin5_ext': 'suhosin.so',
  2551. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  2552. 'suhosin7_ext': 'suhosin7.so',
  2553. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  2554. 'svn': 'php5-svn',
  2555. 'sybase': 'php5-sybase',
  2556. 'tcpdf': 'php-tcpdf',
  2557. 'temp_dir': '/tmp',
  2558. 'tidy': 'php5-tidy',
  2559. 'uuid': 'php-uuid',
  2560. 'xcache': 'php5-xcache',
  2561. 'xdebug': 'php5-xdebug',
  2562. 'xml': 'php5',
  2563. 'xsl': 'php5-xsl',
  2564. 'zip': 'php5',
  2565. },
  2566. 'fpm': {
  2567. 'conf': '/etc/php5/fpm/php-fpm.conf',
  2568. 'ini': '/etc/php5/fpm/php.ini',
  2569. 'pools': '/etc/php5/fpm/pool.d',
  2570. 'service': 'php5-fpm',
  2571. 'defaults': odict([
  2572. ('global', odict([
  2573. ('pid', '/var/run/php5-fpm.pid'),
  2574. ('error_log', '/var/log/php5-fpm.log'),
  2575. ])),
  2576. ('include', '/etc/php5/fpm/pool.d/*.conf'),
  2577. ]),
  2578. },
  2579. 'hhvm': {
  2580. 'conf': '/etc/hhvm/server.ini',
  2581. 'ini': '/etc/hhvm/php.ini',
  2582. 'service': 'hhvm',
  2583. 'defaults': {},
  2584. 'server': odict([
  2585. ('pid', '/var/run/hhvm/pid'),
  2586. ('hhvm.server.port', '9000'),
  2587. ('hhvm.server.type', 'fastcgi'),
  2588. ('hhvm.server.default_document', 'index.php'),
  2589. ('hhvm.log.use_log_file', 'true'),
  2590. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  2591. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  2592. ]),
  2593. 'php': odict([
  2594. ('session.save_handler', 'files'),
  2595. ('session.save_path', '/var/lib/hhvm/sessions'),
  2596. ('session.gc_maxlifetime', '1440'),
  2597. ('hhvm.log.level', 'Warning'),
  2598. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  2599. ('hhvm.log.runtime_error_reporting_level', '8191'),
  2600. ('hhvm.mysql.typed_results', 'false'),
  2601. ]),
  2602. },
  2603. 'cli': {
  2604. 'ini': '/etc/php5/cli/php.ini',
  2605. },
  2606. 'apache2': {
  2607. 'ini': '/etc/php5/apache2/php.ini',
  2608. },
  2609. 'xcache': {
  2610. 'ini': '/etc/php5/mods-available/xcache.ini',
  2611. 'defaults': {},
  2612. },
  2613. },
  2614. 'Gentoo' : {
  2615. 'pkgs': {
  2616. 'apache2': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[apache2]'}],
  2617. 'apc': [{'name': 'dev-php/pecl-apcu_bc','version': '[php_targets_php' + useversion + ']'}],
  2618. 'apcu': [{'name': 'dev-php/pecl-apcu','version': '[php_targets_php' + useversion + ']'}],
  2619. 'bcmath': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[bcmath]'}],
  2620. 'cache-lite': 'dev-php/PEAR-Cache_Lite',
  2621. 'cgi': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[cgi]'}],
  2622. 'cli': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[cli]'}],
  2623. 'composer_bin': 'composer',
  2624. 'console-table': 'dev-php/PEAR-Console_Table',
  2625. 'curl': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[curl]'}],
  2626. 'ext_conf_path': '/etc/php/fpm-php' + phpng_version + '/ext',
  2627. 'fpm': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[fpm]'}],
  2628. 'gd': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[gd]'}],
  2629. 'geoip': [{'name': 'dev-php/pecl-geoip','version': '[php_targets_php' + useversion + ']'}],
  2630. 'gettext': 'dev-php/PEAR-File_Gettext',
  2631. 'gmp': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[gmp]'}],
  2632. 'imagick': [{'name': 'dev-php/pecl-imagick','version': '[php_targets_php' + useversion + ']'}],
  2633. 'imap': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[imap]'}],
  2634. 'intl': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[intl]'}],
  2635. 'json': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[json]'}],
  2636. 'ldap': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[ldap]'}],
  2637. 'local_bin': '/usr/local/bin',
  2638. 'auth-sasl': 'dev-php/PEAR-Auth_SASL',
  2639. 'mail': 'dev-php/PHPMailer',
  2640. 'memcache': [{'name': 'dev-php/pecl-memcache','version': '[php_targets_php' + useversion + ']'}],
  2641. 'memcached': [{'name': 'dev-php/pecl-memcached','version': '[php_targets_php' + useversion + ']'}],
  2642. 'mongo': [{'name': 'dev-php/pecl-mongo','version': '[php_targets_php' + useversion + ']'}],
  2643. 'mongodb': [{'name': 'dev-php/pecl-mongodb','version': '[php_targets_php' + useversion + ']'}],
  2644. 'mysqlnd': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[mysql]'}],
  2645. 'mysql': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[mysqli]'}],
  2646. 'net-smtp': 'dev-php/PEAR-Net_SMTP',
  2647. 'net4': 'dev-php/PEAR-Net_IPv4',
  2648. 'net6': 'dev-php/PEAR-Net_IPv6',
  2649. 'oauth': [{'name': 'dev-php/pecl-oauth','version': '[php_targets_php' + useversion + ']'}],
  2650. 'opcache': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[opcache]'}],
  2651. 'pear': 'dev-php/pear',
  2652. 'pgsql': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[postgres]'}],
  2653. 'php': [{'name': 'dev-lang/php','version': '~:' + phpng_version}],
  2654. 'pspell': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[spell]'}],
  2655. 'redis': [{'name': 'dev-php/pecl-redis','version': '[php_targets_php' + useversion + ']'}],
  2656. 'snmp': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[snmp]'}],
  2657. 'soap': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[soap]'}],
  2658. 'ssh2': [{'name': 'dev-php/pecl-ssh2','version': '[php_targets_php' + useversion + ']'}],
  2659. 'sqlite': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[sqlite]'}],
  2660. 'sybase': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[sybase-ct]'}],
  2661. 'tcpdf': 'dev-php/tcpdf',
  2662. 'temp_dir': '/tmp',
  2663. 'tidy': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[tidy]'}],
  2664. 'xdebug': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[debug]'}],
  2665. 'xml': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[xml]'}],
  2666. 'xsl': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[xslt]'}],
  2667. 'zip': [{'name': 'dev-lang/php','version': ':' + phpng_version + '[zip]'}],
  2668. },
  2669. 'fpm': {
  2670. 'conf': '/etc/php/fpm-php' + phpng_version + '/php-fpm.conf',
  2671. 'ini': '/etc/php/fpm-php' + phpng_version + '/php.ini',
  2672. 'pools': '/etc/php/fpm-php' + phpng_version + '/fpm.d',
  2673. 'service': 'php-fpm',
  2674. 'defaults': odict([
  2675. ('global', odict([
  2676. ('pid', '/var/run/php-fpm-php' + phpng_version + '.pid'),
  2677. ('error_log', '/var/log/php' + phpng_version + '-fpm.log'),
  2678. ])),
  2679. ('include', '/etc/php/fpm-php' + phpng_version + '/fpm.d/*.conf'),
  2680. ]),
  2681. },
  2682. 'cli': {
  2683. 'ini': '/etc/php/cli-php' + phpng_version + '/php.ini',
  2684. },
  2685. 'apache2': {
  2686. 'ini': '/etc/php/apache2-php' + phpng_version + '/php.ini',
  2687. },
  2688. },
  2689. 'RedHat': {
  2690. 'pkgs': {
  2691. 'adodb': 'php-adodb',
  2692. 'apc': 'php-pecl-apc',
  2693. 'apcu': 'php-pecl-apcu',
  2694. 'bcmath': 'php-bcmath',
  2695. 'build_pkgs': ['openssl-devel', 'gcc'],
  2696. 'cache-lite': 'php-pear-Cache-Lite',
  2697. 'cgi': 'php-cgi',
  2698. 'cli': 'php-cli',
  2699. 'composer': 'composer',
  2700. 'composer_bin': 'composer',
  2701. 'console-table': 'php-pear-Console-Table',
  2702. 'curl': ['php-common', 'curl'],
  2703. 'dev': 'php-devel',
  2704. 'ext_conf_path': '/etc/php.d',
  2705. 'fpm': 'php-fpm',
  2706. 'gd': 'php-gd',
  2707. 'geoip': 'php-pecl-geoip',
  2708. 'geshi': 'php-geshi',
  2709. 'gettext': 'php-php-gettext',
  2710. 'http': 'php-pecl-http',
  2711. 'imagick': 'php-pecl-imagick',
  2712. 'imap': 'php-imap',
  2713. 'intl': 'php-intl',
  2714. 'json': 'php-common',
  2715. 'ldap': 'php-ldap',
  2716. 'local_bin': '/usr/local/bin',
  2717. 'auth-sasl': 'php-pear-Auth-SASL',
  2718. 'mail': 'php-pear-Mail',
  2719. 'mbstring': 'php-mbstring',
  2720. 'mcrypt': 'php-mcrypt',
  2721. 'memcache': 'php-pecl-memcache',
  2722. 'memcached': 'php-pecl-memcached',
  2723. 'mysql': 'php-mysql',
  2724. 'mysqlnd': 'php-mysqlnd',
  2725. 'net-smtp': 'php-pear-Net-SMTP',
  2726. 'net4': 'php-pear-Net-IPv4',
  2727. 'oauth': 'php-pecl-oauth',
  2728. 'opcache': 'php-pecl-zendopcache',
  2729. 'pear': 'php-pear',
  2730. 'pgsql': 'php-pgsql',
  2731. 'php': 'php',
  2732. 'pspell': 'php-pspell',
  2733. 'redis': 'php-pecl-redis',
  2734. 'seclib': 'php-phpseclib',
  2735. 'snmp': 'php-snmp',
  2736. 'soap': 'php-soap',
  2737. 'sqlite': 'php-pdo',
  2738. 'ssh2': 'php-pecl-ssh2',
  2739. 'suhosin5_ext': 'suhosin.so',
  2740. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  2741. 'suhosin7_ext': 'suhosin7.so',
  2742. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  2743. 'tcpdf': 'php-tcpdf',
  2744. 'temp_dir': '/tmp',
  2745. 'tidy': 'php-tidy',
  2746. 'uuid': 'php-pecl-uuid',
  2747. 'xcache': 'php-xcache',
  2748. 'xdebug': 'php-pecl-xdebug',
  2749. 'xml': 'php-xml',
  2750. 'xsl': 'php-xml',
  2751. 'zip': 'php',
  2752. },
  2753. 'fpm': {
  2754. 'conf': '/etc/php-fpm.conf',
  2755. 'ini': '/etc/php.ini',
  2756. 'pools': '/etc/php-fpm.d',
  2757. 'service': 'php-fpm',
  2758. 'defaults': {
  2759. 'global': {
  2760. 'pid': '/var/run/php-fpm/php-fpm.pid',
  2761. 'error_log': '/var/log/php-fpm/error.log',
  2762. },
  2763. 'include': '/etc/php-fpm.d/*.conf',
  2764. },
  2765. },
  2766. 'cli': {
  2767. 'ini': '/etc/php.ini',
  2768. },
  2769. 'xcache': {
  2770. 'ini': '/etc/php.d/xcache.ini',
  2771. },
  2772. },
  2773. 'Suse': {
  2774. 'pkgs': {
  2775. 'adodb': 'php5-dba',
  2776. 'apache2': 'apache2-mod_php5',
  2777. 'cli': 'php5',
  2778. 'curl': 'php5-curl',
  2779. 'fpm': 'php5-fpm',
  2780. 'gd': 'php5-gd',
  2781. 'imap': 'php5-imap',
  2782. 'intl': 'php5-intl',
  2783. 'json': 'php5-json',
  2784. 'ldap': 'php5-ldap',
  2785. 'mbstring': 'php5-mbstring',
  2786. 'mcrypt': 'php5-mcrypt',
  2787. 'mysql': 'php5-mysql',
  2788. 'oauth': 'php5-oauth',
  2789. 'pear': 'php5-pear',
  2790. 'pgsql': 'php5-pgsql',
  2791. 'php': 'php5',
  2792. 'snmp': 'php5-snmp',
  2793. 'soap': 'php5-soap',
  2794. 'sqlite': 'php5-sqlite',
  2795. 'suhosin': 'php5-suhosin',
  2796. 'xml': ['php5-xmlreader','php5-xmlwriter','php5-xmlrpc'],
  2797. 'zip': 'php5-zip',
  2798. },
  2799. 'fpm': {
  2800. 'conf': '/etc/php-fpm.conf',
  2801. 'ini': '/etc/php.ini',
  2802. 'pools': '/etc/php-fpm.d',
  2803. 'service': 'php-fpm',
  2804. 'defaults': {
  2805. 'global': {
  2806. 'pid': '/var/run/php-fpm/php-fpm.pid',
  2807. 'error_log': '/var/log/php-fpm/error.log',
  2808. },
  2809. 'include': '/etc/php-fpm.d/*.conf',
  2810. },
  2811. },
  2812. 'cli': {
  2813. 'ini': '/etc/php.ini',
  2814. },
  2815. },
  2816. 'Arch': {
  2817. 'pkgs': {
  2818. 'apc': 'php-apcu',
  2819. 'apcu': 'php-apcu-bc',
  2820. 'cgi': 'php-cgi',
  2821. 'cli': 'php',
  2822. 'composer_bin': 'composer',
  2823. 'curl': 'curl',
  2824. 'fpm': 'php-fpm',
  2825. 'gd': 'php-gd',
  2826. 'geoip': 'php-geoip',
  2827. 'imap': 'php-imap',
  2828. 'intl': 'php-intl',
  2829. 'local_bin': '/usr/local/bin',
  2830. 'mcrypt': 'php-mcrypt',
  2831. 'memcache': 'php-memcache',
  2832. 'memcached': 'php-memcached',
  2833. 'pgsql': 'php-pgsql',
  2834. 'php': 'php',
  2835. 'pspell': 'php-pspell',
  2836. 'snmp': 'php-snmp',
  2837. 'sqlite': 'php-sqlite',
  2838. 'temp_dir': '/tmp',
  2839. 'tidy': 'php-tidy',
  2840. 'xcache': 'php-xcache',
  2841. 'xdebug': 'xdebug',
  2842. 'xsl': 'php-xsl',
  2843. },
  2844. 'fpm': {
  2845. 'conf': '/etc/php/php-fpm.conf',
  2846. 'ini': '/etc/php/php.ini',
  2847. 'pools': '/etc/php/fpm.d',
  2848. 'service': 'php-fpm',
  2849. 'defaults': {
  2850. 'global': {
  2851. 'pid': '/run/php-fpm/php-fpm.pid',
  2852. 'error_log': 'log/php-fpm.log',
  2853. },
  2854. 'include': '/etc/php/fpm.d/*.conf',
  2855. },
  2856. },
  2857. 'cli': {
  2858. 'ini': '/etc/php/php-cli.ini',
  2859. },
  2860. 'xcache': {
  2861. 'ini': '/etc/php/conf.d/xcache.ini',
  2862. },
  2863. },
  2864. 'FreeBSD': {
  2865. 'apache2': {
  2866. 'ini': '/usr/local/etc/php.ini',
  2867. 'module_config': '/usr/local/etc/apache24/modules.d/050_mod_php.conf',
  2868. 'name': 'apache24',
  2869. },
  2870. 'cli': {
  2871. 'ini': '/usr/local/etc/php.ini'
  2872. },
  2873. 'pkgs': {
  2874. 'apache2': 'mod_php' + freebsd_phpng_version,
  2875. 'composer_bin': 'composer',
  2876. 'cli': 'php' + freebsd_phpng_version,
  2877. 'ctype': 'php' + freebsd_phpng_version + '-ctype',
  2878. 'curl': 'php' + freebsd_phpng_version + '-curl',
  2879. 'filter': 'php' + freebsd_phpng_version + '-filter',
  2880. 'gd': 'php' + freebsd_phpng_version + '-gd',
  2881. 'hash': 'php' + freebsd_phpng_version + '-hash',
  2882. 'json': 'php' + freebsd_phpng_version + '-json',
  2883. 'local_bin': '/usr/local/bin',
  2884. 'mbstring': 'php' + freebsd_phpng_version + '-mbstring',
  2885. 'mcrypt': 'php' + freebsd_phpng_version + '-mcrypt',
  2886. 'mysql': 'php' + freebsd_phpng_version + '-mysqli',
  2887. 'openssl': 'php' + freebsd_phpng_version + '-openssl',
  2888. 'php': 'php' + freebsd_phpng_version,
  2889. 'phar': 'php' + freebsd_phpng_version + '-phar',
  2890. 'posix': 'php' + freebsd_phpng_version + '-posix',
  2891. 'session': 'php' + freebsd_phpng_version + '-session',
  2892. 'snmp': 'php' + freebsd_phpng_version + '-snmp',
  2893. 'temp_dir': '/tmp',
  2894. 'xml': 'php' + freebsd_phpng_version + '-xml',
  2895. 'zip': 'php' + freebsd_phpng_version + '-zip',
  2896. },
  2897. },
  2898. }),
  2899. 'fpm': {
  2900. 'service': {
  2901. 'enabled': True,
  2902. 'opts': {},
  2903. },
  2904. 'config': {
  2905. 'ini': {
  2906. 'opts': {},
  2907. 'settings': {},
  2908. },
  2909. 'conf': {
  2910. 'opts': {},
  2911. 'settings': {},
  2912. },
  2913. },
  2914. 'pools': {
  2915. 'default.conf': {
  2916. 'enabled': False,
  2917. 'opts': {},
  2918. },
  2919. },
  2920. },
  2921. 'hhvm': {
  2922. 'service': {
  2923. 'enabled': True,
  2924. 'opts': {},
  2925. },
  2926. 'config': {
  2927. 'server': {
  2928. 'opts': {},
  2929. 'settings': {},
  2930. },
  2931. 'php': {
  2932. 'opts': {},
  2933. 'settings': {},
  2934. },
  2935. },
  2936. },
  2937. 'cli': {
  2938. 'ini': {
  2939. 'opts': {},
  2940. 'settings': {},
  2941. }
  2942. },
  2943. 'apache2': {
  2944. 'ini': {
  2945. 'opts': {},
  2946. 'settings': {},
  2947. }
  2948. },
  2949. 'xcache': {
  2950. 'ini': {
  2951. 'defaults': {
  2952. 'xcache-common': {
  2953. 'extension': 'xcache.so',
  2954. },
  2955. 'xcache.admin': {
  2956. 'xcache.admin.enable_auth': 'On',
  2957. },
  2958. 'xcache': {
  2959. 'xcache.shm_scheme': '"mmap"',
  2960. 'xcache.size': '60M',
  2961. 'xcache.count': '1',
  2962. 'xcache.slots': '8K',
  2963. 'xcache.ttl': '0',
  2964. 'xcache.gc_interval': '0',
  2965. 'xcache.var_size': '4M',
  2966. 'xcache.var_count': '1',
  2967. 'xcache.var_slots': '8K',
  2968. 'xcache.var_ttl': '0',
  2969. 'xcache.var_maxttl': '0',
  2970. 'xcache.var_gc_interval': '300',
  2971. 'xcache.var_namespace_mode': '0',
  2972. 'xcache.var_namespace': '""',
  2973. 'xcache.readonly_protection': 'Off',
  2974. 'xcache.mmap_path': '"/dev/zero"',
  2975. 'xcache.coredump_directory': '""',
  2976. 'xcache.coredump_type': '0',
  2977. 'xcache.disable_on_crash': 'Off',
  2978. 'xcache.experimental': 'Off',
  2979. 'xcache.cacher': 'On',
  2980. 'xcache.stat': 'On',
  2981. 'xcache.optimizer': 'Off',
  2982. },
  2983. 'xcache.coverager': {
  2984. 'xcache.coverager': 'Off',
  2985. 'xcache.coverager_autostart': 'On',
  2986. 'xcache.coveragedump_directory': '""',
  2987. },
  2988. },
  2989. 'opts': {},
  2990. 'settings': {},
  2991. }
  2992. },
  2993. 'ini': {
  2994. 'defaults': {
  2995. 'PHP': {
  2996. 'engine': 'On',
  2997. 'allow_url_fopen': 'On',
  2998. 'allow_url_include': 'Off',
  2999. 'asp_tags': 'Off',
  3000. 'auto_globals_jit': 'On',
  3001. 'default_mimetype': '"text/html"',
  3002. 'default_socket_timeout': 60,
  3003. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  3004. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  3005. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  3006. 'display_errors': 'Off',
  3007. 'display_startup_errors': 'Off',
  3008. 'enable_dl': 'Off',
  3009. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  3010. 'expose_php': 'On',
  3011. 'file_uploads': 'On',
  3012. 'html_errors': 'On',
  3013. 'ignore_repeated_errors': 'Off',
  3014. 'ignore_repeated_source': 'Off',
  3015. 'implicit_flush': 'Off',
  3016. 'log_errors': 'On',
  3017. 'log_errors_max_len': 1024,
  3018. 'max_execution_time': 30,
  3019. 'max_file_uploads': 20,
  3020. 'max_input_nesting_level': 64,
  3021. 'max_input_time': 60,
  3022. 'max_input_vars': 1000,
  3023. 'memory_limit': '128M',
  3024. 'output_buffering': 4096,
  3025. 'post_max_size': '8M',
  3026. 'precision': 14,
  3027. 'register_argc_argv': 'Off',
  3028. 'report_memleaks': 'On',
  3029. 'request_order': 'GP',
  3030. 'serialize_precision': 17,
  3031. 'short_open_tag': 'Off',
  3032. 'track_errors': 'Off',
  3033. 'upload_max_filesize': '2M',
  3034. 'variables_order': 'GPCS',
  3035. 'zend.enable_gc': 'On',
  3036. 'zlib.output_compression': 'Off',
  3037. },
  3038. 'CLI Server': {
  3039. 'cli_server.color': 'On'
  3040. },
  3041. 'Date': {
  3042. 'date.timezone': 'America/New_York'
  3043. },
  3044. 'Pdo_mysql': {
  3045. 'pdo_mysql.cache_size': 2000
  3046. },
  3047. 'mail function': {
  3048. 'SMTP': 'localhost',
  3049. 'mail.add_x_header': 'On'
  3050. },
  3051. 'SQL': {
  3052. 'sql.safe_mode': 'Off'
  3053. },
  3054. 'ODBC': {
  3055. 'odbc.allow_persistent': 'On',
  3056. 'odbc.check_persistent': 'On',
  3057. 'odbc.max_persistent': '-1',
  3058. 'odbc.max_links': '-1',
  3059. 'odbc.defaultlrl': 4096,
  3060. 'odbc.defaultbinmode': 1
  3061. },
  3062. 'Interbase': {
  3063. 'ibase.allow_persistent': 1,
  3064. 'ibase.max_persistent': -1,
  3065. 'ibase.max_links': -1,
  3066. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  3067. 'ibase.dateformat': '"%Y-%m-%d"',
  3068. 'ibase.timeformat': '"%H:%M:%S"'
  3069. },
  3070. 'MySQL': {
  3071. 'mysql.allow_local_infile': 'On',
  3072. 'mysql.allow_persistent': 'On',
  3073. 'mysql.cache_size': '2000',
  3074. 'mysql.max_persistent': -1,
  3075. 'mysql.max_links': -1,
  3076. 'mysql.connect_timeout': 60,
  3077. 'mysql.trace_mode': 'Off'
  3078. },
  3079. 'MySQLi': {
  3080. 'mysqli.max_persistent': -1,
  3081. 'mysqli.allow_persistent': 'On',
  3082. 'mysqli.max_links': -1,
  3083. 'mysqli.cache_size': 2000,
  3084. 'mysqli.default_port': 3306,
  3085. 'mysqli.reconnect': 'Off'
  3086. },
  3087. 'mysqlnd': {
  3088. 'mysqlnd.collect_statistics': 'On',
  3089. 'mysqlnd.collect_memory_statistics': 'Off'
  3090. },
  3091. 'PostgreSQL': {
  3092. 'pgsql.allow_persistent': 'On',
  3093. 'pgsql.auto_reset_persistent': 'Off',
  3094. 'pgsql.max_persistent': -1,
  3095. 'pgsql.max_links': -1,
  3096. 'pgsql.ignore_notice': 0,
  3097. 'pgsql.log_notice': 0
  3098. },
  3099. 'Sybase-CT': {
  3100. 'sybct.allow_persistent': 'On',
  3101. 'sybct.max_persistent': -1,
  3102. 'sybct.max_links': -1,
  3103. 'sybct.min_server_severity': 10,
  3104. 'sybct.min_client_severity': 10
  3105. },
  3106. 'bcmath': {
  3107. 'bcmath.scale': 0
  3108. },
  3109. 'Session': {
  3110. 'session.save_handler': 'files',
  3111. 'session.use_strict_mode': 0,
  3112. 'session.use_cookies': 1,
  3113. 'session.use_only_cookies': 1,
  3114. 'session.name': 'PHPSESSID',
  3115. 'session.auto_start': 0,
  3116. 'session.cookie_lifetime': 0,
  3117. 'session.cookie_path': '/',
  3118. 'session.serialize_handler': 'php',
  3119. 'session.gc_probability': 0,
  3120. 'session.gc_divisor': 1000,
  3121. 'session.gc_maxlifetime': 1440,
  3122. 'session.bug_compat_42': 'Off',
  3123. 'session.bug_compat_warn': 'Off',
  3124. 'session.cache_limiter': 'nocache',
  3125. 'session.cache_expire': '180',
  3126. 'session.use_trans_sid': 0,
  3127. 'session.hash_function': 0,
  3128. 'session.hash_bits_per_character': 5,
  3129. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  3130. },
  3131. 'MSSQL': {
  3132. 'mssql.allow_persistent': 'On',
  3133. 'mssql.max_persistent': -1,
  3134. 'mssql.max_links': -1,
  3135. 'mssql.min_error_severity': 10,
  3136. 'mssql.min_message_severity': 10,
  3137. 'mssql.compatibility_mode': 'Off',
  3138. 'mssql.secure_connection': 'Off'
  3139. },
  3140. 'Tidy': {
  3141. 'tidy.clean_output': 'Off'
  3142. },
  3143. 'soap': {
  3144. 'soap.wsdl_cache_enabled': 1,
  3145. 'soap.wsdl_cache_dir': '"/tmp"',
  3146. 'soap.wsdl_cache_ttl': 86400,
  3147. 'soap.wsdl_cache_limit': 5
  3148. },
  3149. 'ldap': {
  3150. 'ldap.max_links': -1
  3151. },
  3152. },
  3153. },
  3154. }, merge=True) %}
  3155. {%- endif %}