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

2647 satır
126KB

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