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.

2662 lines
126KB

  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. 'mbstring': 'php' + phpng_version + '-mbstring',
  42. 'mcrypt': 'php' + phpng_version + '-mcrypt',
  43. 'memcache': 'php-memcache',
  44. 'memcached': 'php-memcached',
  45. 'mongo': 'php-mongo',
  46. 'mongodb': 'php-mongodb',
  47. 'mysql': 'php' + phpng_version + '-mysql',
  48. 'mysqlnd': 'php' + phpng_version + '-mysql',
  49. 'net4': 'php-net-ipv4',
  50. 'net6': 'php-net-ipv6',
  51. 'oauth': 'php-oauth',
  52. 'opcache': 'php' + phpng_version + '-opcache',
  53. 'pear': 'php-pear',
  54. 'pgsql': 'php' + phpng_version + '-pgsql',
  55. 'php': 'php' + phpng_version,
  56. 'phpenmod_command': 'phpenmod -v' + phpng_version,
  57. 'pspell': 'php' + phpng_version + '-pspell',
  58. 'redis': 'php' + phpng_version + '-redis',
  59. 'seclib': ['php-phpseclib', 'php-seclib'],
  60. 'snmp': 'php' + phpng_version + '-snmp',
  61. 'soap': 'php' + phpng_version + '-soap',
  62. 'ssh2': 'php-ssh2',
  63. 'sqlite': 'php' + phpng_version + '-sqlite3',
  64. 'suhosin5_ext': 'suhosin.so',
  65. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  66. 'suhosin7_ext': 'suhosin7.so',
  67. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  68. 'sybase': 'php' + phpng_version + '-sybase',
  69. 'tcpdf': 'php-tcpdf',
  70. 'temp_dir': '/tmp',
  71. 'tidy': 'php' + phpng_version + '-tidy',
  72. 'xdebug': 'php' + phpng_version + '-xdebug',
  73. 'xml': 'php' + phpng_version + '-xml',
  74. 'xsl': 'php' + phpng_version + '-xsl',
  75. 'zip': 'php' + phpng_version + '-zip',
  76. },
  77. 'fpm': {
  78. 'conf': '/etc/php/' + phpng_version + '/fpm/php-fpm.conf',
  79. 'ini': '/etc/php/' + phpng_version + '/fpm/php.ini',
  80. 'pools': '/etc/php/' + phpng_version + '/fpm/pool.d',
  81. 'service': 'php' + phpng_version + '-fpm',
  82. 'defaults': odict([
  83. ('global', odict([
  84. ('pid', '/var/run/php' + phpng_version + '-fpm.pid'),
  85. ('error_log', '/var/log/php' + phpng_version + '-fpm.log'),
  86. ])),
  87. ('include', '/etc/php/' + phpng_version + '/fpm/pool.d/*.conf'),
  88. ]),
  89. },
  90. 'hhvm': {
  91. 'conf': '/etc/hhvm/server.ini',
  92. 'ini': '/etc/hhvm/php.ini',
  93. 'service': 'hhvm',
  94. 'defaults': {},
  95. 'server': odict([
  96. ('pid', '/var/run/hhvm/pid'),
  97. ('hhvm.server.port', '9000'),
  98. ('hhvm.server.type', 'fastcgi'),
  99. ('hhvm.server.default_document', 'index.php'),
  100. ('hhvm.log.use_log_file', 'true'),
  101. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  102. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  103. ]),
  104. 'php': odict([
  105. ('session.save_handler', 'files'),
  106. ('session.save_path', '/var/lib/hhvm/sessions'),
  107. ('session.gc_maxlifetime', '1440'),
  108. ('hhvm.log.level', 'Warning'),
  109. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  110. ('hhvm.log.runtime_error_reporting_level', '8191'),
  111. ('hhvm.mysql.typed_results', 'false'),
  112. ]),
  113. },
  114. 'cli': {
  115. 'ini': '/etc/php/' + phpng_version + '/cli/php.ini',
  116. },
  117. 'apache2': {
  118. 'ini': '/etc/php/' + phpng_version + '/apache2/php.ini',
  119. },
  120. },
  121. }),
  122. 'fpm': {
  123. 'service': {
  124. 'enabled': True,
  125. 'opts': {},
  126. },
  127. 'config': {
  128. 'ini': {
  129. 'opts': {},
  130. 'settings': {},
  131. },
  132. 'conf': {
  133. 'opts': {},
  134. 'settings': {},
  135. },
  136. },
  137. 'pools': {},
  138. },
  139. 'hhvm': {
  140. 'service': {
  141. 'enabled': True,
  142. 'opts': {},
  143. },
  144. 'config': {
  145. 'server': {
  146. 'opts': {},
  147. 'settings': {},
  148. },
  149. 'php': {
  150. 'opts': {},
  151. 'settings': {},
  152. },
  153. },
  154. },
  155. 'cli': {
  156. 'ini': {
  157. 'opts': {},
  158. 'settings': {},
  159. }
  160. },
  161. 'apache2': {
  162. 'ini': {
  163. 'opts': {},
  164. 'settings': {},
  165. }
  166. },
  167. 'ini': {
  168. 'defaults': {
  169. 'PHP': {
  170. 'allow_url_fopen': 'On',
  171. 'allow_url_include': 'Off',
  172. 'asp_tags': 'Off',
  173. 'auto_globals_jit': 'On',
  174. 'default_mimetype': '"text/html"',
  175. 'default_socket_timeout': 60,
  176. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  177. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  178. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  179. 'display_errors': 'Off',
  180. 'display_startup_errors': 'Off',
  181. 'enable_dl': 'Off',
  182. 'engine': 'On',
  183. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  184. 'expose_php': 'On',
  185. 'file_uploads': 'On',
  186. 'html_errors': 'On',
  187. 'ignore_repeated_errors': 'Off',
  188. 'ignore_repeated_source': 'Off',
  189. 'implicit_flush': 'Off',
  190. 'log_errors': 'On',
  191. 'log_errors_max_len': 1024,
  192. 'max_execution_time': 30,
  193. 'max_file_uploads': 20,
  194. 'max_input_nesting_level': 64,
  195. 'max_input_time': 60,
  196. 'max_input_vars': 1000,
  197. 'memory_limit': '128M',
  198. 'output_buffering': 4096,
  199. 'post_max_size': '8M',
  200. 'precision': 14,
  201. 'register_argc_argv': 'Off',
  202. 'report_memleaks': 'On',
  203. 'request_order': 'GP',
  204. 'serialize_precision': 17,
  205. 'short_open_tag': 'Off',
  206. 'track_errors': 'Off',
  207. 'upload_max_filesize': '2M',
  208. 'variables_order': 'GPCS',
  209. 'zend.enable_gc': 'On',
  210. 'zlib.output_compression': 'Off',
  211. },
  212. 'CLI Server': {
  213. 'cli_server.color': 'On'
  214. },
  215. 'Date': {
  216. 'date.timezone': 'America/New_York'
  217. },
  218. 'Pdo_mysql': {
  219. 'pdo_mysql.cache_size': 2000
  220. },
  221. 'mail function': {
  222. 'SMTP': 'localhost',
  223. 'mail.add_x_header': 'On'
  224. },
  225. 'SQL': {
  226. 'sql.safe_mode': 'Off'
  227. },
  228. 'ODBC': {
  229. 'odbc.allow_persistent': 'On',
  230. 'odbc.check_persistent': 'On',
  231. 'odbc.max_persistent': '-1',
  232. 'odbc.max_links': '-1',
  233. 'odbc.defaultlrl': 4096,
  234. 'odbc.defaultbinmode': 1
  235. },
  236. 'Interbase': {
  237. 'ibase.allow_persistent': 1,
  238. 'ibase.max_persistent': -1,
  239. 'ibase.max_links': -1,
  240. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  241. 'ibase.dateformat': '"%Y-%m-%d"',
  242. 'ibase.timeformat': '"%H:%M:%S"'
  243. },
  244. 'MySQL': {
  245. 'mysql.allow_local_infile': 'On',
  246. 'mysql.allow_persistent': 'On',
  247. 'mysql.cache_size': '2000',
  248. 'mysql.max_persistent': -1,
  249. 'mysql.max_links': -1,
  250. 'mysql.connect_timeout': 60,
  251. 'mysql.trace_mode': 'Off'
  252. },
  253. 'MySQLi': {
  254. 'mysqli.max_persistent': -1,
  255. 'mysqli.allow_persistent': 'On',
  256. 'mysqli.max_links': -1,
  257. 'mysqli.cache_size': 2000,
  258. 'mysqli.default_port': 3306,
  259. 'mysqli.reconnect': 'Off'
  260. },
  261. 'mysqlnd': {
  262. 'mysqlnd.collect_statistics': 'On',
  263. 'mysqlnd.collect_memory_statistics': 'Off'
  264. },
  265. 'PostgreSQL': {
  266. 'pgsql.allow_persistent': 'On',
  267. 'pgsql.auto_reset_persistent': 'Off',
  268. 'pgsql.max_persistent': -1,
  269. 'pgsql.max_links': -1,
  270. 'pgsql.ignore_notice': 0,
  271. 'pgsql.log_notice': 0
  272. },
  273. 'Sybase-CT': {
  274. 'sybct.allow_persistent': 'On',
  275. 'sybct.max_persistent': -1,
  276. 'sybct.max_links': -1,
  277. 'sybct.min_server_severity': 10,
  278. 'sybct.min_client_severity': 10
  279. },
  280. 'bcmath': {
  281. 'bcmath.scale': 0
  282. },
  283. 'Session': {
  284. 'session.save_handler': 'files',
  285. 'session.use_strict_mode': 0,
  286. 'session.use_cookies': 1,
  287. 'session.use_only_cookies': 1,
  288. 'session.name': 'PHPSESSID',
  289. 'session.auto_start': 0,
  290. 'session.cookie_lifetime': 0,
  291. 'session.cookie_path': '/',
  292. 'session.serialize_handler': 'php',
  293. 'session.gc_probability': 0,
  294. 'session.gc_divisor': 1000,
  295. 'session.gc_maxlifetime': 1440,
  296. 'session.bug_compat_42': 'Off',
  297. 'session.bug_compat_warn': 'Off',
  298. 'session.cache_limiter': 'nocache',
  299. 'session.cache_expire': '180',
  300. 'session.use_trans_sid': 0,
  301. 'session.hash_function': 0,
  302. 'session.hash_bits_per_character': 5,
  303. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  304. },
  305. 'MSSQL': {
  306. 'mssql.allow_persistent': 'On',
  307. 'mssql.max_persistent': -1,
  308. 'mssql.max_links': -1,
  309. 'mssql.min_error_severity': 10,
  310. 'mssql.min_message_severity': 10,
  311. 'mssql.compatibility_mode': 'Off',
  312. 'mssql.secure_connection': 'Off'
  313. },
  314. 'Tidy': {
  315. 'tidy.clean_output': 'Off'
  316. },
  317. 'soap': {
  318. 'soap.wsdl_cache_enabled': 1,
  319. 'soap.wsdl_cache_dir': '"/tmp"',
  320. 'soap.wsdl_cache_ttl': 86400,
  321. 'soap.wsdl_cache_limit': 5
  322. },
  323. 'ldap': {
  324. 'ldap.max_links': -1
  325. },
  326. },
  327. },
  328. }, merge=True) %}
  329. {%- else %}
  330. {%- set php = salt['pillar.get']('php:ng', {
  331. 'lookup': salt['grains.filter_by']({
  332. 'Debian': {
  333. 'pkgs': {
  334. 'adodb': 'libphp-adodb',
  335. 'apache2': 'libapache2-mod-php' + phpng_version,
  336. 'apc': 'php-apcu',
  337. 'apcu': 'php-apcu-bc',
  338. 'bcmath': 'php' + phpng_version + '-bcmath',
  339. 'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev', 'gcc', 'make', 'autoconf', 'libc-dev', 'pkg-config'],
  340. 'cache-lite': 'php-cache-lite',
  341. 'cgi': 'php' + phpng_version + '-cgi',
  342. 'cli': 'php' + phpng_version + '-cli',
  343. 'composer_bin': 'composer',
  344. 'console-table': 'php-console-table',
  345. 'curl': 'php' + phpng_version + '-curl',
  346. 'dev': 'php' + phpng_version + '-dev',
  347. 'ext_conf_path': '/etc/php/' + phpng_version + '/mods-available',
  348. 'fpm': 'php' + phpng_version + '-fpm',
  349. 'gd': 'php' + phpng_version + '-gd',
  350. 'gearman': 'php-gearman',
  351. 'geoip': 'php-geoip',
  352. 'geshi': 'php-geshi',
  353. 'gettext': 'php' + phpng_version,
  354. 'gmp': 'php' + phpng_version + '-gmp',
  355. 'hhvm': 'hhvm',
  356. 'imagick': 'php-imagick',
  357. 'imap': 'php' + phpng_version + '-imap',
  358. 'intl': 'php' + phpng_version + '-intl',
  359. 'json': 'php' + phpng_version + '-json',
  360. 'ldap': 'php' + phpng_version + '-ldap',
  361. 'local_bin': '/usr/local/bin',
  362. 'mbstring': 'php' + phpng_version + '-mbstring',
  363. 'mcrypt': 'php' + phpng_version + '-mcrypt',
  364. 'memcache': 'php-memcache',
  365. 'memcached': 'php-memcached',
  366. 'mongo': 'php-mongo',
  367. 'mongodb': 'php-mongodb',
  368. 'mysql': 'php' + phpng_version + '-mysql',
  369. 'mysqlnd': 'php' + phpng_version + '-mysql',
  370. 'net4': 'php-net-ipv4',
  371. 'net6': 'php-net-ipv6',
  372. 'oauth': 'php-oauth',
  373. 'opcache': 'php' + phpng_version + '-opcache',
  374. 'pear': 'php-pear',
  375. 'pgsql': 'php' + phpng_version + '-pgsql',
  376. 'php': 'php' + phpng_version,
  377. 'phpenmod_command': 'phpenmod -v' + phpng_version,
  378. 'pspell': 'php' + phpng_version + '-pspell',
  379. 'readline': 'php' + phpng_version + '-readline',
  380. 'redis': 'php' + phpng_version + '-redis',
  381. 'seclib': 'php-seclib',
  382. 'snmp': 'php' + phpng_version + '-snmp',
  383. 'soap': 'php' + phpng_version + '-soap',
  384. 'ssh2': 'php-ssh2',
  385. 'sqlite': 'php' + phpng_version + '-sqlite3',
  386. 'suhosin5_ext': 'suhosin.so',
  387. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  388. 'suhosin7_ext': 'suhosin7.so',
  389. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  390. 'sybase': 'php' + phpng_version + '-sybase',
  391. 'tcpdf': 'php-tcpdf',
  392. 'temp_dir': '/tmp',
  393. 'tidy': 'php' + phpng_version + '-tidy',
  394. 'xdebug': 'php' + phpng_version + '-xdebug',
  395. 'xml': 'php' + phpng_version + '-xml',
  396. 'xsl': 'php' + phpng_version + '-xsl',
  397. 'zip': 'php' + phpng_version + '-zip',
  398. },
  399. 'fpm': {
  400. 'conf': '/etc/php/' + phpng_version + '/fpm/php-fpm.conf',
  401. 'ini': '/etc/php/' + phpng_version + '/fpm/php.ini',
  402. 'pools': '/etc/php/' + phpng_version + '/fpm/pool.d',
  403. 'service': 'php' + phpng_version + '-fpm',
  404. 'defaults': odict([
  405. ('global', odict([
  406. ('pid', '/var/run/php' + phpng_version + '-fpm.pid'),
  407. ('error_log', '/var/log/php' + phpng_version + '-fpm.log'),
  408. ])),
  409. ('include', '/etc/php/' + phpng_version + '/fpm/pool.d/*.conf'),
  410. ]),
  411. },
  412. 'hhvm': {
  413. 'conf': '/etc/hhvm/server.ini',
  414. 'ini': '/etc/hhvm/php.ini',
  415. 'service': 'hhvm',
  416. 'defaults': {},
  417. 'server': odict([
  418. ('pid', '/var/run/hhvm/pid'),
  419. ('hhvm.server.port', '9000'),
  420. ('hhvm.server.type', 'fastcgi'),
  421. ('hhvm.server.default_document', 'index.php'),
  422. ('hhvm.log.use_log_file', 'true'),
  423. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  424. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  425. ]),
  426. 'php': odict([
  427. ('session.save_handler', 'files'),
  428. ('session.save_path', '/var/lib/hhvm/sessions'),
  429. ('session.gc_maxlifetime', '1440'),
  430. ('hhvm.log.level', 'Warning'),
  431. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  432. ('hhvm.log.runtime_error_reporting_level', '8191'),
  433. ('hhvm.mysql.typed_results', 'false'),
  434. ]),
  435. },
  436. 'cli': {
  437. 'ini': '/etc/php/' + phpng_version + '/cli/php.ini',
  438. },
  439. 'apache2': {
  440. 'ini': '/etc/php/' + phpng_version + '/apache2/php.ini',
  441. },
  442. },
  443. }),
  444. 'fpm': {
  445. 'service': {
  446. 'enabled': True,
  447. 'opts': {},
  448. },
  449. 'config': {
  450. 'ini': {
  451. 'opts': {},
  452. 'settings': {},
  453. },
  454. 'conf': {
  455. 'opts': {},
  456. 'settings': {},
  457. },
  458. },
  459. 'pools': {},
  460. },
  461. 'hhvm': {
  462. 'service': {
  463. 'enabled': True,
  464. 'opts': {},
  465. },
  466. 'config': {
  467. 'server': {
  468. 'opts': {},
  469. 'settings': {},
  470. },
  471. 'php': {
  472. 'opts': {},
  473. 'settings': {},
  474. },
  475. },
  476. },
  477. 'cli': {
  478. 'ini': {
  479. 'opts': {},
  480. 'settings': {},
  481. }
  482. },
  483. 'apache2': {
  484. 'ini': {
  485. 'opts': {},
  486. 'settings': {},
  487. }
  488. },
  489. 'ini': {
  490. 'defaults': {
  491. 'PHP': {
  492. 'allow_url_fopen': 'On',
  493. 'allow_url_include': 'Off',
  494. 'asp_tags': 'Off',
  495. 'auto_globals_jit': 'On',
  496. 'default_mimetype': '"text/html"',
  497. 'default_socket_timeout': 60,
  498. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  499. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  500. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  501. 'display_errors': 'Off',
  502. 'display_startup_errors': 'Off',
  503. 'enable_dl': 'Off',
  504. 'engine': 'On',
  505. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  506. 'expose_php': 'On',
  507. 'file_uploads': 'On',
  508. 'html_errors': 'On',
  509. 'ignore_repeated_errors': 'Off',
  510. 'ignore_repeated_source': 'Off',
  511. 'implicit_flush': 'Off',
  512. 'log_errors': 'On',
  513. 'log_errors_max_len': 1024,
  514. 'max_execution_time': 30,
  515. 'max_file_uploads': 20,
  516. 'max_input_nesting_level': 64,
  517. 'max_input_time': 60,
  518. 'max_input_vars': 1000,
  519. 'memory_limit': '128M',
  520. 'output_buffering': 4096,
  521. 'post_max_size': '8M',
  522. 'precision': 14,
  523. 'register_argc_argv': 'Off',
  524. 'report_memleaks': 'On',
  525. 'request_order': 'GP',
  526. 'serialize_precision': 17,
  527. 'short_open_tag': 'Off',
  528. 'track_errors': 'Off',
  529. 'upload_max_filesize': '2M',
  530. 'variables_order': 'GPCS',
  531. 'zend.enable_gc': 'On',
  532. 'zlib.output_compression': 'Off',
  533. },
  534. 'CLI Server': {
  535. 'cli_server.color': 'On'
  536. },
  537. 'Date': {
  538. 'date.timezone': 'America/New_York'
  539. },
  540. 'Pdo_mysql': {
  541. 'pdo_mysql.cache_size': 2000
  542. },
  543. 'mail function': {
  544. 'SMTP': 'localhost',
  545. 'mail.add_x_header': 'On'
  546. },
  547. 'SQL': {
  548. 'sql.safe_mode': 'Off'
  549. },
  550. 'ODBC': {
  551. 'odbc.allow_persistent': 'On',
  552. 'odbc.check_persistent': 'On',
  553. 'odbc.max_persistent': '-1',
  554. 'odbc.max_links': '-1',
  555. 'odbc.defaultlrl': 4096,
  556. 'odbc.defaultbinmode': 1
  557. },
  558. 'Interbase': {
  559. 'ibase.allow_persistent': 1,
  560. 'ibase.max_persistent': -1,
  561. 'ibase.max_links': -1,
  562. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  563. 'ibase.dateformat': '"%Y-%m-%d"',
  564. 'ibase.timeformat': '"%H:%M:%S"'
  565. },
  566. 'MySQL': {
  567. 'mysql.allow_local_infile': 'On',
  568. 'mysql.allow_persistent': 'On',
  569. 'mysql.cache_size': '2000',
  570. 'mysql.max_persistent': -1,
  571. 'mysql.max_links': -1,
  572. 'mysql.connect_timeout': 60,
  573. 'mysql.trace_mode': 'Off'
  574. },
  575. 'MySQLi': {
  576. 'mysqli.max_persistent': -1,
  577. 'mysqli.allow_persistent': 'On',
  578. 'mysqli.max_links': -1,
  579. 'mysqli.cache_size': 2000,
  580. 'mysqli.default_port': 3306,
  581. 'mysqli.reconnect': 'Off'
  582. },
  583. 'mysqlnd': {
  584. 'mysqlnd.collect_statistics': 'On',
  585. 'mysqlnd.collect_memory_statistics': 'Off'
  586. },
  587. 'PostgreSQL': {
  588. 'pgsql.allow_persistent': 'On',
  589. 'pgsql.auto_reset_persistent': 'Off',
  590. 'pgsql.max_persistent': -1,
  591. 'pgsql.max_links': -1,
  592. 'pgsql.ignore_notice': 0,
  593. 'pgsql.log_notice': 0
  594. },
  595. 'Sybase-CT': {
  596. 'sybct.allow_persistent': 'On',
  597. 'sybct.max_persistent': -1,
  598. 'sybct.max_links': -1,
  599. 'sybct.min_server_severity': 10,
  600. 'sybct.min_client_severity': 10
  601. },
  602. 'bcmath': {
  603. 'bcmath.scale': 0
  604. },
  605. 'Session': {
  606. 'session.save_handler': 'files',
  607. 'session.use_strict_mode': 0,
  608. 'session.use_cookies': 1,
  609. 'session.use_only_cookies': 1,
  610. 'session.name': 'PHPSESSID',
  611. 'session.auto_start': 0,
  612. 'session.cookie_lifetime': 0,
  613. 'session.cookie_path': '/',
  614. 'session.serialize_handler': 'php',
  615. 'session.gc_probability': 0,
  616. 'session.gc_divisor': 1000,
  617. 'session.gc_maxlifetime': 1440,
  618. 'session.bug_compat_42': 'Off',
  619. 'session.bug_compat_warn': 'Off',
  620. 'session.cache_limiter': 'nocache',
  621. 'session.cache_expire': '180',
  622. 'session.use_trans_sid': 0,
  623. 'session.hash_function': 0,
  624. 'session.hash_bits_per_character': 5,
  625. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  626. },
  627. 'MSSQL': {
  628. 'mssql.allow_persistent': 'On',
  629. 'mssql.max_persistent': -1,
  630. 'mssql.max_links': -1,
  631. 'mssql.min_error_severity': 10,
  632. 'mssql.min_message_severity': 10,
  633. 'mssql.compatibility_mode': 'Off',
  634. 'mssql.secure_connection': 'Off'
  635. },
  636. 'Tidy': {
  637. 'tidy.clean_output': 'Off'
  638. },
  639. 'soap': {
  640. 'soap.wsdl_cache_enabled': 1,
  641. 'soap.wsdl_cache_dir': '"/tmp"',
  642. 'soap.wsdl_cache_ttl': 86400,
  643. 'soap.wsdl_cache_limit': 5
  644. },
  645. 'ldap': {
  646. 'ldap.max_links': -1
  647. },
  648. },
  649. },
  650. }, merge=True) %}
  651. {%- endif %}
  652. {%- else %}
  653. {%- if salt['grains.get']('osrelease')|string >= '17.10' %}
  654. {%- set php = salt['pillar.get']('php:ng', {
  655. 'lookup': salt['grains.filter_by']({
  656. 'Ubuntu': {
  657. 'pkgs': {
  658. 'adodb': 'libphp-adodb',
  659. 'apache2': 'libapache2-mod-php',
  660. 'apc': 'php',
  661. 'apcu': 'php-apcu',
  662. 'bcmath': 'php7.1-bcmath',
  663. 'cache-lite': 'php-cache-lite',
  664. 'cgi': 'php-cgi',
  665. 'cli': 'php-cli',
  666. 'console-table': 'php-console-table',
  667. 'curl': 'php-curl',
  668. 'dev': 'php7.1-dev',
  669. 'fpm': 'php-fpm',
  670. 'gd': 'php-gd',
  671. 'geoip': 'php-geoip',
  672. 'geshi': 'php-geshi',
  673. 'gmp': 'php-gmp',
  674. 'hhvm': 'hhvm',
  675. 'imagick': 'php-imagick',
  676. 'imap': 'php-imap',
  677. 'intl': 'php-intl',
  678. 'json': 'php-json',
  679. 'ldap': 'php-ldap',
  680. 'mbstring': 'php-mbstring',
  681. 'mcrypt': 'php-mcrypt',
  682. 'memcache': 'php-memcache',
  683. 'memcached': 'php-memcached',
  684. 'mongodb': 'php-mongodb',
  685. 'mysql': 'php-mysql',
  686. 'mysqlnd': 'php',
  687. 'net4': 'php-net-ipv4',
  688. 'net6': 'php-net-ipv6',
  689. 'oauth': 'php-oauth',
  690. 'opcache': 'php7.1-opcache',
  691. 'pear': 'php-pear',
  692. 'pgsql': 'php-pgsql',
  693. 'php': 'php',
  694. 'phpenmod_command': 'phpenmod',
  695. 'pspell': 'php-pspell',
  696. 'redis': 'php-redis',
  697. 'seclib': ['php-phpseclib', 'php-seclib'],
  698. 'snmp': 'php-snmp',
  699. 'soap': 'php-soap',
  700. 'sqlite': 'php-sqlite3',
  701. 'ssh2': 'php-ssh2',
  702. 'suhosin': 'php',
  703. 'sybase': 'php-sybase',
  704. 'tcpdf': 'php-tcpdf',
  705. 'tidy': 'php7.1-tidy',
  706. 'xcache': 'php',
  707. 'xdebug': 'php-xdebug',
  708. 'xml': 'php-xml',
  709. 'xsl': 'php7.1-xsl',
  710. 'zip': 'php-zip',
  711. },
  712. 'fpm': {
  713. 'conf': '/etc/php/7.1/fpm/php-fpm.conf',
  714. 'ini': '/etc/php/7.1/fpm/php.ini',
  715. 'pools': '/etc/php/7.1/fpm/pool.d',
  716. 'service': 'php7.1-fpm',
  717. 'defaults': odict([
  718. ('global', odict([
  719. ('pid', '/var/run/php7.1-fpm.pid'),
  720. ('error_log', '/var/log/php7.1-fpm.log'),
  721. ])),
  722. ('include', '/etc/php/7.1/fpm/pool.d/*.conf'),
  723. ]),
  724. },
  725. 'hhvm': {
  726. 'conf': '/etc/hhvm/server.ini',
  727. 'ini': '/etc/hhvm/php.ini',
  728. 'service': 'hhvm',
  729. 'defaults': {},
  730. 'server': odict([
  731. ('pid', '/var/run/hhvm/pid'),
  732. ('hhvm.server.port', '9000'),
  733. ('hhvm.server.type', 'fastcgi'),
  734. ('hhvm.server.default_document', 'index.php'),
  735. ('hhvm.log.use_log_file', 'true'),
  736. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  737. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  738. ]),
  739. 'php': odict([
  740. ('session.save_handler', 'files'),
  741. ('session.save_path', '/var/lib/hhvm/sessions'),
  742. ('session.gc_maxlifetime', '1440'),
  743. ('hhvm.log.level', 'Warning'),
  744. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  745. ('hhvm.log.runtime_error_reporting_level', '8191'),
  746. ('hhvm.mysql.typed_results', 'false'),
  747. ]),
  748. },
  749. 'cli': {
  750. 'ini': '/etc/php/7.1/cli/php.ini',
  751. },
  752. 'apache2': {
  753. 'ini': '/etc/php/7.1/apache2/php.ini',
  754. },
  755. 'xcache': {
  756. 'ini': '/etc/php/7.1/mods-available/xcache.ini',
  757. 'defaults': {},
  758. },
  759. },
  760. }, grain="os"),
  761. 'fpm': {
  762. 'service': {
  763. 'enabled': True,
  764. 'opts': {},
  765. },
  766. 'config': {
  767. 'ini': {
  768. 'opts': {},
  769. 'settings': {},
  770. },
  771. 'conf': {
  772. 'opts': {},
  773. 'settings': {},
  774. },
  775. },
  776. 'pools': {
  777. 'default.conf': {
  778. 'enabled': False,
  779. 'opts': {},
  780. },
  781. },
  782. },
  783. 'hhvm': {
  784. 'service': {
  785. 'enabled': True,
  786. 'opts': {},
  787. },
  788. 'config': {
  789. 'server': {
  790. 'opts': {},
  791. 'settings': {},
  792. },
  793. 'php': {
  794. 'opts': {},
  795. 'settings': {},
  796. },
  797. },
  798. },
  799. 'cli': {
  800. 'ini': {
  801. 'opts': {},
  802. 'settings': {},
  803. }
  804. },
  805. 'apache2': {
  806. 'ini': {
  807. 'opts': {},
  808. 'settings': {},
  809. }
  810. },
  811. 'xcache': {
  812. 'ini': {
  813. 'defaults': {
  814. 'xcache-common': {
  815. 'extension': 'xcache.so',
  816. },
  817. 'xcache.admin': {
  818. 'xcache.admin.enable_auth': 'On',
  819. },
  820. 'xcache': {
  821. 'xcache.shm_scheme': '"mmap"',
  822. 'xcache.size': '60M',
  823. 'xcache.count': '1',
  824. 'xcache.slots': '8K',
  825. 'xcache.ttl': '0',
  826. 'xcache.gc_interval': '0',
  827. 'xcache.var_size': '4M',
  828. 'xcache.var_count': '1',
  829. 'xcache.var_slots': '8K',
  830. 'xcache.var_ttl': '0',
  831. 'xcache.var_maxttl': '0',
  832. 'xcache.var_gc_interval': '300',
  833. 'xcache.var_namespace_mode': '0',
  834. 'xcache.var_namespace': '""',
  835. 'xcache.readonly_protection': 'Off',
  836. 'xcache.mmap_path': '"/dev/zero"',
  837. 'xcache.coredump_directory': '""',
  838. 'xcache.coredump_type': '0',
  839. 'xcache.disable_on_crash': 'Off',
  840. 'xcache.experimental': 'Off',
  841. 'xcache.cacher': 'On',
  842. 'xcache.stat': 'On',
  843. 'xcache.optimizer': 'Off',
  844. },
  845. 'xcache.coverager': {
  846. 'xcache.coverager': 'Off',
  847. 'xcache.coverager_autostart': 'On',
  848. 'xcache.coveragedump_directory': '""',
  849. },
  850. },
  851. 'opts': {},
  852. 'settings': {},
  853. }
  854. },
  855. 'ini': {
  856. 'defaults': {
  857. 'PHP': {
  858. 'allow_url_fopen': 'On',
  859. 'allow_url_include': 'Off',
  860. 'asp_tags': 'Off',
  861. 'auto_globals_jit': 'On',
  862. 'default_mimetype': '"text/html"',
  863. 'default_socket_timeout': 60,
  864. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  865. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  866. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  867. 'display_errors': 'Off',
  868. 'display_startup_errors': 'Off',
  869. 'enable_dl': 'Off',
  870. 'engine': 'On',
  871. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  872. 'expose_php': 'On',
  873. 'file_uploads': 'On',
  874. 'html_errors': 'On',
  875. 'ignore_repeated_errors': 'Off',
  876. 'ignore_repeated_source': 'Off',
  877. 'implicit_flush': 'Off',
  878. 'log_errors': 'On',
  879. 'log_errors_max_len': 1024,
  880. 'max_execution_time': 30,
  881. 'max_file_uploads': 20,
  882. 'max_input_nesting_level': 64,
  883. 'max_input_time': 60,
  884. 'max_input_vars': 1000,
  885. 'memory_limit': '128M',
  886. 'output_buffering': 4096,
  887. 'post_max_size': '8M',
  888. 'precision': 14,
  889. 'register_argc_argv': 'Off',
  890. 'report_memleaks': 'On',
  891. 'request_order': 'GP',
  892. 'serialize_precision': 17,
  893. 'short_open_tag': 'Off',
  894. 'track_errors': 'Off',
  895. 'upload_max_filesize': '2M',
  896. 'variables_order': 'GPCS',
  897. 'zend.enable_gc': 'On',
  898. 'zlib.output_compression': 'Off',
  899. },
  900. 'CLI Server': {
  901. 'cli_server.color': 'On'
  902. },
  903. 'Date': {
  904. 'date.timezone': 'America/New_York'
  905. },
  906. 'Pdo_mysql': {
  907. 'pdo_mysql.cache_size': 2000
  908. },
  909. 'mail function': {
  910. 'SMTP': 'localhost',
  911. 'mail.add_x_header': 'On'
  912. },
  913. 'SQL': {
  914. 'sql.safe_mode': 'Off'
  915. },
  916. 'ODBC': {
  917. 'odbc.allow_persistent': 'On',
  918. 'odbc.check_persistent': 'On',
  919. 'odbc.max_persistent': '-1',
  920. 'odbc.max_links': '-1',
  921. 'odbc.defaultlrl': 4096,
  922. 'odbc.defaultbinmode': 1
  923. },
  924. 'Interbase': {
  925. 'ibase.allow_persistent': 1,
  926. 'ibase.max_persistent': -1,
  927. 'ibase.max_links': -1,
  928. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  929. 'ibase.dateformat': '"%Y-%m-%d"',
  930. 'ibase.timeformat': '"%H:%M:%S"'
  931. },
  932. 'MySQL': {
  933. 'mysql.allow_local_infile': 'On',
  934. 'mysql.allow_persistent': 'On',
  935. 'mysql.cache_size': '2000',
  936. 'mysql.max_persistent': -1,
  937. 'mysql.max_links': -1,
  938. 'mysql.connect_timeout': 60,
  939. 'mysql.trace_mode': 'Off'
  940. },
  941. 'MySQLi': {
  942. 'mysqli.max_persistent': -1,
  943. 'mysqli.allow_persistent': 'On',
  944. 'mysqli.max_links': -1,
  945. 'mysqli.cache_size': 2000,
  946. 'mysqli.default_port': 3306,
  947. 'mysqli.reconnect': 'Off'
  948. },
  949. 'mysqlnd': {
  950. 'mysqlnd.collect_statistics': 'On',
  951. 'mysqlnd.collect_memory_statistics': 'Off'
  952. },
  953. 'PostgreSQL': {
  954. 'pgsql.allow_persistent': 'On',
  955. 'pgsql.auto_reset_persistent': 'Off',
  956. 'pgsql.max_persistent': -1,
  957. 'pgsql.max_links': -1,
  958. 'pgsql.ignore_notice': 0,
  959. 'pgsql.log_notice': 0
  960. },
  961. 'Sybase-CT': {
  962. 'sybct.allow_persistent': 'On',
  963. 'sybct.max_persistent': -1,
  964. 'sybct.max_links': -1,
  965. 'sybct.min_server_severity': 10,
  966. 'sybct.min_client_severity': 10
  967. },
  968. 'bcmath': {
  969. 'bcmath.scale': 0
  970. },
  971. 'Session': {
  972. 'session.save_handler': 'files',
  973. 'session.use_strict_mode': 0,
  974. 'session.use_cookies': 1,
  975. 'session.use_only_cookies': 1,
  976. 'session.name': 'PHPSESSID',
  977. 'session.auto_start': 0,
  978. 'session.cookie_lifetime': 0,
  979. 'session.cookie_path': '/',
  980. 'session.serialize_handler': 'php',
  981. 'session.gc_probability': 0,
  982. 'session.gc_divisor': 1000,
  983. 'session.gc_maxlifetime': 1440,
  984. 'session.bug_compat_42': 'Off',
  985. 'session.bug_compat_warn': 'Off',
  986. 'session.cache_limiter': 'nocache',
  987. 'session.cache_expire': '180',
  988. 'session.use_trans_sid': 0,
  989. 'session.hash_function': 0,
  990. 'session.hash_bits_per_character': 5,
  991. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  992. },
  993. 'MSSQL': {
  994. 'mssql.allow_persistent': 'On',
  995. 'mssql.max_persistent': -1,
  996. 'mssql.max_links': -1,
  997. 'mssql.min_error_severity': 10,
  998. 'mssql.min_message_severity': 10,
  999. 'mssql.compatibility_mode': 'Off',
  1000. 'mssql.secure_connection': 'Off'
  1001. },
  1002. 'Tidy': {
  1003. 'tidy.clean_output': 'Off'
  1004. },
  1005. 'soap': {
  1006. 'soap.wsdl_cache_enabled': 1,
  1007. 'soap.wsdl_cache_dir': '"/tmp"',
  1008. 'soap.wsdl_cache_ttl': 86400,
  1009. 'soap.wsdl_cache_limit': 5
  1010. },
  1011. 'ldap': {
  1012. 'ldap.max_links': -1
  1013. },
  1014. },
  1015. },
  1016. }, merge=True) %}
  1017. {%- elif salt['grains.get']('osrelease')|string >= '16.04' %}
  1018. {%- set php = salt['pillar.get']('php:ng', {
  1019. 'lookup': salt['grains.filter_by']({
  1020. 'Ubuntu': {
  1021. 'pkgs': {
  1022. 'adodb': 'libphp-adodb',
  1023. 'apache2': 'libapache2-mod-php',
  1024. 'apc': 'php',
  1025. 'apcu': 'php-apcu',
  1026. 'bcmath': 'php7.0-bcmath',
  1027. 'cache-lite': 'php-cache-lite',
  1028. 'cgi': 'php-cgi',
  1029. 'cli': 'php-cli',
  1030. 'console-table': 'php-console-table',
  1031. 'curl': 'php-curl',
  1032. 'dev': 'php7.0-dev',
  1033. 'fpm': 'php-fpm',
  1034. 'gd': 'php-gd',
  1035. 'geoip': 'php-geoip',
  1036. 'geshi': 'php-geshi',
  1037. 'gmp': 'php-gmp',
  1038. 'hhvm': 'hhvm',
  1039. 'imagick': 'php-imagick',
  1040. 'imap': 'php-imap',
  1041. 'intl': 'php-intl',
  1042. 'json': 'php-json',
  1043. 'ldap': 'php-ldap',
  1044. 'mbstring': 'php-mbstring',
  1045. 'mcrypt': 'php-mcrypt',
  1046. 'memcache': 'php-memcache',
  1047. 'memcached': 'php-memcached',
  1048. 'mongodb': 'php-mongodb',
  1049. 'mysql': 'php-mysql',
  1050. 'mysqlnd': 'php',
  1051. 'net4': 'php-net-ipv4',
  1052. 'net6': 'php-net-ipv6',
  1053. 'oauth': 'php-oauth',
  1054. 'opcache': 'php7.0-opcache',
  1055. 'pear': 'php-pear',
  1056. 'pgsql': 'php-pgsql',
  1057. 'php': 'php',
  1058. 'phpenmod_command': 'phpenmod',
  1059. 'pspell': 'php-pspell',
  1060. 'redis': 'php-redis',
  1061. 'seclib': ['php-phpseclib', 'php-seclib'],
  1062. 'snmp': 'php-snmp',
  1063. 'soap': 'php-soap',
  1064. 'sqlite': 'php-sqlite3',
  1065. 'ssh2': 'php-ssh2',
  1066. 'suhosin': 'php',
  1067. 'sybase': 'php-sybase',
  1068. 'tcpdf': 'php-tcpdf',
  1069. 'tidy': 'php7.0-tidy',
  1070. 'xcache': 'php',
  1071. 'xdebug': 'php-xdebug',
  1072. 'xml': 'php-xml',
  1073. 'xsl': 'php7.0-xsl',
  1074. 'zip': 'php-zip',
  1075. },
  1076. 'fpm': {
  1077. 'conf': '/etc/php/7.0/fpm/php-fpm.conf',
  1078. 'ini': '/etc/php/7.0/fpm/php.ini',
  1079. 'pools': '/etc/php/7.0/fpm/pool.d',
  1080. 'service': 'php7.0-fpm',
  1081. 'defaults': odict([
  1082. ('global', odict([
  1083. ('pid', '/var/run/php7.0-fpm.pid'),
  1084. ('error_log', '/var/log/php7.0-fpm.log'),
  1085. ])),
  1086. ('include', '/etc/php/7.0/fpm/pool.d/*.conf'),
  1087. ]),
  1088. },
  1089. 'hhvm': {
  1090. 'conf': '/etc/hhvm/server.ini',
  1091. 'ini': '/etc/hhvm/php.ini',
  1092. 'service': 'hhvm',
  1093. 'defaults': {},
  1094. 'server': odict([
  1095. ('pid', '/var/run/hhvm/pid'),
  1096. ('hhvm.server.port', '9000'),
  1097. ('hhvm.server.type', 'fastcgi'),
  1098. ('hhvm.server.default_document', 'index.php'),
  1099. ('hhvm.log.use_log_file', 'true'),
  1100. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  1101. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  1102. ]),
  1103. 'php': odict([
  1104. ('session.save_handler', 'files'),
  1105. ('session.save_path', '/var/lib/hhvm/sessions'),
  1106. ('session.gc_maxlifetime', '1440'),
  1107. ('hhvm.log.level', 'Warning'),
  1108. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  1109. ('hhvm.log.runtime_error_reporting_level', '8191'),
  1110. ('hhvm.mysql.typed_results', 'false'),
  1111. ]),
  1112. },
  1113. 'cli': {
  1114. 'ini': '/etc/php/7.0/cli/php.ini',
  1115. },
  1116. 'apache2': {
  1117. 'ini': '/etc/php/7.0/apache2/php.ini',
  1118. },
  1119. 'xcache': {
  1120. 'ini': '/etc/php/7.0/mods-available/xcache.ini',
  1121. 'defaults': {},
  1122. },
  1123. },
  1124. }, grain="os"),
  1125. 'fpm': {
  1126. 'service': {
  1127. 'enabled': True,
  1128. 'opts': {},
  1129. },
  1130. 'config': {
  1131. 'ini': {
  1132. 'opts': {},
  1133. 'settings': {},
  1134. },
  1135. 'conf': {
  1136. 'opts': {},
  1137. 'settings': {},
  1138. },
  1139. },
  1140. 'pools': {
  1141. 'default.conf': {
  1142. 'enabled': False,
  1143. 'opts': {},
  1144. },
  1145. },
  1146. },
  1147. 'hhvm': {
  1148. 'service': {
  1149. 'enabled': True,
  1150. 'opts': {},
  1151. },
  1152. 'config': {
  1153. 'server': {
  1154. 'opts': {},
  1155. 'settings': {},
  1156. },
  1157. 'php': {
  1158. 'opts': {},
  1159. 'settings': {},
  1160. },
  1161. },
  1162. },
  1163. 'cli': {
  1164. 'ini': {
  1165. 'opts': {},
  1166. 'settings': {},
  1167. }
  1168. },
  1169. 'apache2': {
  1170. 'ini': {
  1171. 'opts': {},
  1172. 'settings': {},
  1173. }
  1174. },
  1175. 'xcache': {
  1176. 'ini': {
  1177. 'defaults': {
  1178. 'xcache-common': {
  1179. 'extension': 'xcache.so',
  1180. },
  1181. 'xcache.admin': {
  1182. 'xcache.admin.enable_auth': 'On',
  1183. },
  1184. 'xcache': {
  1185. 'xcache.shm_scheme': '"mmap"',
  1186. 'xcache.size': '60M',
  1187. 'xcache.count': '1',
  1188. 'xcache.slots': '8K',
  1189. 'xcache.ttl': '0',
  1190. 'xcache.gc_interval': '0',
  1191. 'xcache.var_size': '4M',
  1192. 'xcache.var_count': '1',
  1193. 'xcache.var_slots': '8K',
  1194. 'xcache.var_ttl': '0',
  1195. 'xcache.var_maxttl': '0',
  1196. 'xcache.var_gc_interval': '300',
  1197. 'xcache.var_namespace_mode': '0',
  1198. 'xcache.var_namespace': '""',
  1199. 'xcache.readonly_protection': 'Off',
  1200. 'xcache.mmap_path': '"/dev/zero"',
  1201. 'xcache.coredump_directory': '""',
  1202. 'xcache.coredump_type': '0',
  1203. 'xcache.disable_on_crash': 'Off',
  1204. 'xcache.experimental': 'Off',
  1205. 'xcache.cacher': 'On',
  1206. 'xcache.stat': 'On',
  1207. 'xcache.optimizer': 'Off',
  1208. },
  1209. 'xcache.coverager': {
  1210. 'xcache.coverager': 'Off',
  1211. 'xcache.coverager_autostart': 'On',
  1212. 'xcache.coveragedump_directory': '""',
  1213. },
  1214. },
  1215. 'opts': {},
  1216. 'settings': {},
  1217. }
  1218. },
  1219. 'ini': {
  1220. 'defaults': {
  1221. 'PHP': {
  1222. 'allow_url_fopen': 'On',
  1223. 'allow_url_include': 'Off',
  1224. 'asp_tags': 'Off',
  1225. 'auto_globals_jit': 'On',
  1226. 'default_mimetype': '"text/html"',
  1227. 'default_socket_timeout': 60,
  1228. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  1229. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  1230. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  1231. 'display_errors': 'Off',
  1232. 'display_startup_errors': 'Off',
  1233. 'enable_dl': 'Off',
  1234. 'engine': 'On',
  1235. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  1236. 'expose_php': 'On',
  1237. 'file_uploads': 'On',
  1238. 'html_errors': 'On',
  1239. 'ignore_repeated_errors': 'Off',
  1240. 'ignore_repeated_source': 'Off',
  1241. 'implicit_flush': 'Off',
  1242. 'log_errors': 'On',
  1243. 'log_errors_max_len': 1024,
  1244. 'max_execution_time': 30,
  1245. 'max_file_uploads': 20,
  1246. 'max_input_nesting_level': 64,
  1247. 'max_input_time': 60,
  1248. 'max_input_vars': 1000,
  1249. 'memory_limit': '128M',
  1250. 'output_buffering': 4096,
  1251. 'post_max_size': '8M',
  1252. 'precision': 14,
  1253. 'register_argc_argv': 'Off',
  1254. 'report_memleaks': 'On',
  1255. 'request_order': 'GP',
  1256. 'serialize_precision': 17,
  1257. 'short_open_tag': 'Off',
  1258. 'track_errors': 'Off',
  1259. 'upload_max_filesize': '2M',
  1260. 'variables_order': 'GPCS',
  1261. 'zend.enable_gc': 'On',
  1262. 'zlib.output_compression': 'Off',
  1263. },
  1264. 'CLI Server': {
  1265. 'cli_server.color': 'On'
  1266. },
  1267. 'Date': {
  1268. 'date.timezone': 'America/New_York'
  1269. },
  1270. 'Pdo_mysql': {
  1271. 'pdo_mysql.cache_size': 2000
  1272. },
  1273. 'mail function': {
  1274. 'SMTP': 'localhost',
  1275. 'mail.add_x_header': 'On'
  1276. },
  1277. 'SQL': {
  1278. 'sql.safe_mode': 'Off'
  1279. },
  1280. 'ODBC': {
  1281. 'odbc.allow_persistent': 'On',
  1282. 'odbc.check_persistent': 'On',
  1283. 'odbc.max_persistent': '-1',
  1284. 'odbc.max_links': '-1',
  1285. 'odbc.defaultlrl': 4096,
  1286. 'odbc.defaultbinmode': 1
  1287. },
  1288. 'Interbase': {
  1289. 'ibase.allow_persistent': 1,
  1290. 'ibase.max_persistent': -1,
  1291. 'ibase.max_links': -1,
  1292. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  1293. 'ibase.dateformat': '"%Y-%m-%d"',
  1294. 'ibase.timeformat': '"%H:%M:%S"'
  1295. },
  1296. 'MySQL': {
  1297. 'mysql.allow_local_infile': 'On',
  1298. 'mysql.allow_persistent': 'On',
  1299. 'mysql.cache_size': '2000',
  1300. 'mysql.max_persistent': -1,
  1301. 'mysql.max_links': -1,
  1302. 'mysql.connect_timeout': 60,
  1303. 'mysql.trace_mode': 'Off'
  1304. },
  1305. 'MySQLi': {
  1306. 'mysqli.max_persistent': -1,
  1307. 'mysqli.allow_persistent': 'On',
  1308. 'mysqli.max_links': -1,
  1309. 'mysqli.cache_size': 2000,
  1310. 'mysqli.default_port': 3306,
  1311. 'mysqli.reconnect': 'Off'
  1312. },
  1313. 'mysqlnd': {
  1314. 'mysqlnd.collect_statistics': 'On',
  1315. 'mysqlnd.collect_memory_statistics': 'Off'
  1316. },
  1317. 'PostgreSQL': {
  1318. 'pgsql.allow_persistent': 'On',
  1319. 'pgsql.auto_reset_persistent': 'Off',
  1320. 'pgsql.max_persistent': -1,
  1321. 'pgsql.max_links': -1,
  1322. 'pgsql.ignore_notice': 0,
  1323. 'pgsql.log_notice': 0
  1324. },
  1325. 'Sybase-CT': {
  1326. 'sybct.allow_persistent': 'On',
  1327. 'sybct.max_persistent': -1,
  1328. 'sybct.max_links': -1,
  1329. 'sybct.min_server_severity': 10,
  1330. 'sybct.min_client_severity': 10
  1331. },
  1332. 'bcmath': {
  1333. 'bcmath.scale': 0
  1334. },
  1335. 'Session': {
  1336. 'session.save_handler': 'files',
  1337. 'session.use_strict_mode': 0,
  1338. 'session.use_cookies': 1,
  1339. 'session.use_only_cookies': 1,
  1340. 'session.name': 'PHPSESSID',
  1341. 'session.auto_start': 0,
  1342. 'session.cookie_lifetime': 0,
  1343. 'session.cookie_path': '/',
  1344. 'session.serialize_handler': 'php',
  1345. 'session.gc_probability': 0,
  1346. 'session.gc_divisor': 1000,
  1347. 'session.gc_maxlifetime': 1440,
  1348. 'session.bug_compat_42': 'Off',
  1349. 'session.bug_compat_warn': 'Off',
  1350. 'session.cache_limiter': 'nocache',
  1351. 'session.cache_expire': '180',
  1352. 'session.use_trans_sid': 0,
  1353. 'session.hash_function': 0,
  1354. 'session.hash_bits_per_character': 5,
  1355. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  1356. },
  1357. 'MSSQL': {
  1358. 'mssql.allow_persistent': 'On',
  1359. 'mssql.max_persistent': -1,
  1360. 'mssql.max_links': -1,
  1361. 'mssql.min_error_severity': 10,
  1362. 'mssql.min_message_severity': 10,
  1363. 'mssql.compatibility_mode': 'Off',
  1364. 'mssql.secure_connection': 'Off'
  1365. },
  1366. 'Tidy': {
  1367. 'tidy.clean_output': 'Off'
  1368. },
  1369. 'soap': {
  1370. 'soap.wsdl_cache_enabled': 1,
  1371. 'soap.wsdl_cache_dir': '"/tmp"',
  1372. 'soap.wsdl_cache_ttl': 86400,
  1373. 'soap.wsdl_cache_limit': 5
  1374. },
  1375. 'ldap': {
  1376. 'ldap.max_links': -1
  1377. },
  1378. },
  1379. },
  1380. }, merge=True) %}
  1381. {%- else %}
  1382. {%- set php = salt['pillar.get']('php:ng', {
  1383. 'lookup': salt['grains.filter_by']({
  1384. 'Ubuntu': {
  1385. 'pkgs': {
  1386. 'adodb': 'php5-adodb',
  1387. 'apache2': 'libapache2-mod-php5',
  1388. 'apc': 'php-apc',
  1389. 'apcu': 'php5-apcu',
  1390. 'bcmath': 'php5',
  1391. 'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev'],
  1392. 'cache-lite': 'php-cache-lite',
  1393. 'cgi': 'php5-cgi',
  1394. 'cli': 'php5-cli',
  1395. 'composer_bin': 'composer',
  1396. 'console-table': 'php-console-table',
  1397. 'curl': 'php5-curl',
  1398. 'dev': ['php5-dev','build-essential'],
  1399. 'ext_conf_path': salt['grains.filter_by']({
  1400. 'precise': '/etc/php5/conf.d',
  1401. 'default': '/etc/php5/mods-available',
  1402. }, grain='oscodename'),
  1403. 'fpm': 'php5-fpm',
  1404. 'gd': 'php5-gd',
  1405. 'gearman': 'php5-gearman',
  1406. 'geoip': 'php5-geoip',
  1407. 'geshi': 'php-geshi',
  1408. 'gettext': 'php-gettext',
  1409. 'gmp': 'php5-gmp',
  1410. 'hhvm': 'hhvm',
  1411. 'imagick': 'php5-imagick',
  1412. 'imap': 'php5-imap',
  1413. 'intl': 'php5-intl',
  1414. 'json': 'php5-json',
  1415. 'ldap': 'php5-ldap',
  1416. 'local_bin': '/usr/local/bin',
  1417. 'mbstring': 'php5',
  1418. 'mcrypt': 'php5-mcrypt',
  1419. 'mdb2': 'php-mdb2',
  1420. 'mdb2-driver-mysql': 'php-mdb2-driver-mysql',
  1421. 'mdb2-driver-pgsql': 'php-mdb2-driver-pgsql',
  1422. 'memcache': 'php5-memcache',
  1423. 'memcached': 'php5-memcached',
  1424. 'mongodb': salt['grains.filter_by']({
  1425. 'trusty': 'php5-mongo',
  1426. 'default': '',
  1427. }, grain='oscodename'),
  1428. 'mysql': 'php5-mysql',
  1429. 'mysqlnd': 'php5-mysqlnd',
  1430. 'net4': 'php-net-ipv4',
  1431. 'net6': 'php-net-ipv6',
  1432. 'oauth': 'php5-oauth',
  1433. 'opcache': 'php5',
  1434. 'pear': 'php-pear',
  1435. 'pgsql': 'php5-pgsql',
  1436. 'php': 'php5',
  1437. 'phpenmod_command': salt['grains.filter_by']({
  1438. 'precise': 'true',
  1439. 'default': 'php5enmod',
  1440. }, grain='oscodename'),
  1441. 'pspell': 'php5-pspell',
  1442. 'redis': 'php5-redis',
  1443. 'seclib': 'php-seclib',
  1444. 'snmp': 'php5-snmp',
  1445. 'soap': 'php-soap',
  1446. 'sqlite': 'php5-sqlite',
  1447. 'ssh2': 'libssh2-php',
  1448. 'suhosin5_ext': 'suhosin.so',
  1449. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  1450. 'suhosin7_ext': 'suhosin7.so',
  1451. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  1452. 'svn': 'php5-svn',
  1453. 'tcpdf': 'php-tcpdf',
  1454. 'tidy': 'php5-tidy',
  1455. 'temp_dir': '/tmp',
  1456. 'xcache': 'php5-xcache',
  1457. 'xdebug': 'php5-xdebug',
  1458. 'xml': 'php5',
  1459. 'xsl': 'php5-xsl',
  1460. 'zip': 'php5',
  1461. },
  1462. 'fpm': {
  1463. 'conf': '/etc/php5/fpm/php-fpm.conf',
  1464. 'ini': '/etc/php5/fpm/php.ini',
  1465. 'pools': '/etc/php5/fpm/pool.d',
  1466. 'service': 'php5-fpm',
  1467. 'defaults': odict([
  1468. ('global', odict([
  1469. ('pid', '/var/run/php5-fpm.pid'),
  1470. ('error_log', '/var/log/php5-fpm.log'),
  1471. ])),
  1472. ('include', '/etc/php5/fpm/pool.d/*.conf'),
  1473. ]),
  1474. },
  1475. 'hhvm': {
  1476. 'conf': '/etc/hhvm/server.ini',
  1477. 'ini': '/etc/hhvm/php.ini',
  1478. 'service': 'hhvm',
  1479. 'defaults': {},
  1480. 'server': odict([
  1481. ('pid', '/var/run/hhvm/pid'),
  1482. ('hhvm.server.port', '9000'),
  1483. ('hhvm.server.type', 'fastcgi'),
  1484. ('hhvm.server.default_document', 'index.php'),
  1485. ('hhvm.log.use_log_file', 'true'),
  1486. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  1487. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  1488. ]),
  1489. 'php': odict([
  1490. ('session.save_handler', 'files'),
  1491. ('session.save_path', '/var/lib/hhvm/sessions'),
  1492. ('session.gc_maxlifetime', '1440'),
  1493. ('hhvm.log.level', 'Warning'),
  1494. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  1495. ('hhvm.log.runtime_error_reporting_level', '8191'),
  1496. ('hhvm.mysql.typed_results', 'false'),
  1497. ]),
  1498. },
  1499. 'cli': {
  1500. 'ini': '/etc/php5/cli/php.ini',
  1501. },
  1502. 'apache2': {
  1503. 'ini': '/etc/php5/apache2/php.ini',
  1504. },
  1505. 'xcache': {
  1506. 'ini': '/etc/php5/mods-available/xcache.ini',
  1507. 'defaults': {},
  1508. },
  1509. },
  1510. }, grain="os"),
  1511. 'fpm': {
  1512. 'service': {
  1513. 'enabled': True,
  1514. 'opts': {},
  1515. },
  1516. 'config': {
  1517. 'ini': {
  1518. 'opts': {},
  1519. 'settings': {},
  1520. },
  1521. 'conf': {
  1522. 'opts': {},
  1523. 'settings': {},
  1524. },
  1525. },
  1526. 'pools': {
  1527. 'default.conf': {
  1528. 'enabled': False,
  1529. 'opts': {},
  1530. },
  1531. },
  1532. },
  1533. 'hhvm': {
  1534. 'service': {
  1535. 'enabled': True,
  1536. 'opts': {},
  1537. },
  1538. 'config': {
  1539. 'server': {
  1540. 'opts': {},
  1541. 'settings': {},
  1542. },
  1543. 'php': {
  1544. 'opts': {},
  1545. 'settings': {},
  1546. },
  1547. },
  1548. },
  1549. 'cli': {
  1550. 'ini': {
  1551. 'opts': {},
  1552. 'settings': {},
  1553. }
  1554. },
  1555. 'apache2': {
  1556. 'ini': {
  1557. 'opts': {},
  1558. 'settings': {},
  1559. }
  1560. },
  1561. 'xcache': {
  1562. 'ini': {
  1563. 'defaults': {
  1564. 'xcache-common': {
  1565. 'extension': 'xcache.so',
  1566. },
  1567. 'xcache.admin': {
  1568. 'xcache.admin.enable_auth': 'On',
  1569. },
  1570. 'xcache': {
  1571. 'xcache.shm_scheme': '"mmap"',
  1572. 'xcache.size': '60M',
  1573. 'xcache.count': '1',
  1574. 'xcache.slots': '8K',
  1575. 'xcache.ttl': '0',
  1576. 'xcache.gc_interval': '0',
  1577. 'xcache.var_size': '4M',
  1578. 'xcache.var_count': '1',
  1579. 'xcache.var_slots': '8K',
  1580. 'xcache.var_ttl': '0',
  1581. 'xcache.var_maxttl': '0',
  1582. 'xcache.var_gc_interval': '300',
  1583. 'xcache.var_namespace_mode': '0',
  1584. 'xcache.var_namespace': '""',
  1585. 'xcache.readonly_protection': 'Off',
  1586. 'xcache.mmap_path': '"/dev/zero"',
  1587. 'xcache.coredump_directory': '""',
  1588. 'xcache.coredump_type': '0',
  1589. 'xcache.disable_on_crash': 'Off',
  1590. 'xcache.experimental': 'Off',
  1591. 'xcache.cacher': 'On',
  1592. 'xcache.stat': 'On',
  1593. 'xcache.optimizer': 'Off',
  1594. },
  1595. 'xcache.coverager': {
  1596. 'xcache.coverager': 'Off',
  1597. 'xcache.coverager_autostart': 'On',
  1598. 'xcache.coveragedump_directory': '""',
  1599. },
  1600. },
  1601. 'opts': {},
  1602. 'settings': {},
  1603. }
  1604. },
  1605. 'ini': {
  1606. 'defaults': {
  1607. 'PHP': {
  1608. 'allow_url_fopen': 'On',
  1609. 'allow_url_include': 'Off',
  1610. 'asp_tags': 'Off',
  1611. 'auto_globals_jit': 'On',
  1612. 'default_mimetype': '"text/html"',
  1613. 'default_socket_timeout': 60,
  1614. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  1615. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  1616. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  1617. 'display_errors': 'Off',
  1618. 'display_startup_errors': 'Off',
  1619. 'enable_dl': 'Off',
  1620. 'engine': 'On',
  1621. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  1622. 'expose_php': 'On',
  1623. 'file_uploads': 'On',
  1624. 'html_errors': 'On',
  1625. 'ignore_repeated_errors': 'Off',
  1626. 'ignore_repeated_source': 'Off',
  1627. 'implicit_flush': 'Off',
  1628. 'log_errors': 'On',
  1629. 'log_errors_max_len': 1024,
  1630. 'max_execution_time': 30,
  1631. 'max_file_uploads': 20,
  1632. 'max_input_nesting_level': 64,
  1633. 'max_input_time': 60,
  1634. 'max_input_vars': 1000,
  1635. 'memory_limit': '128M',
  1636. 'output_buffering': 4096,
  1637. 'post_max_size': '8M',
  1638. 'precision': 14,
  1639. 'register_argc_argv': 'Off',
  1640. 'report_memleaks': 'On',
  1641. 'request_order': 'GP',
  1642. 'serialize_precision': 17,
  1643. 'short_open_tag': 'Off',
  1644. 'track_errors': 'Off',
  1645. 'upload_max_filesize': '2M',
  1646. 'variables_order': 'GPCS',
  1647. 'zend.enable_gc': 'On',
  1648. 'zlib.output_compression': 'Off',
  1649. },
  1650. 'CLI Server': {
  1651. 'cli_server.color': 'On'
  1652. },
  1653. 'Date': {
  1654. 'date.timezone': 'America/New_York'
  1655. },
  1656. 'Pdo_mysql': {
  1657. 'pdo_mysql.cache_size': 2000
  1658. },
  1659. 'mail function': {
  1660. 'SMTP': 'localhost',
  1661. 'mail.add_x_header': 'On'
  1662. },
  1663. 'SQL': {
  1664. 'sql.safe_mode': 'Off'
  1665. },
  1666. 'ODBC': {
  1667. 'odbc.allow_persistent': 'On',
  1668. 'odbc.check_persistent': 'On',
  1669. 'odbc.max_persistent': '-1',
  1670. 'odbc.max_links': '-1',
  1671. 'odbc.defaultlrl': 4096,
  1672. 'odbc.defaultbinmode': 1
  1673. },
  1674. 'Interbase': {
  1675. 'ibase.allow_persistent': 1,
  1676. 'ibase.max_persistent': -1,
  1677. 'ibase.max_links': -1,
  1678. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  1679. 'ibase.dateformat': '"%Y-%m-%d"',
  1680. 'ibase.timeformat': '"%H:%M:%S"'
  1681. },
  1682. 'MySQL': {
  1683. 'mysql.allow_local_infile': 'On',
  1684. 'mysql.allow_persistent': 'On',
  1685. 'mysql.cache_size': '2000',
  1686. 'mysql.max_persistent': -1,
  1687. 'mysql.max_links': -1,
  1688. 'mysql.connect_timeout': 60,
  1689. 'mysql.trace_mode': 'Off'
  1690. },
  1691. 'MySQLi': {
  1692. 'mysqli.max_persistent': -1,
  1693. 'mysqli.allow_persistent': 'On',
  1694. 'mysqli.max_links': -1,
  1695. 'mysqli.cache_size': 2000,
  1696. 'mysqli.default_port': 3306,
  1697. 'mysqli.reconnect': 'Off'
  1698. },
  1699. 'mysqlnd': {
  1700. 'mysqlnd.collect_statistics': 'On',
  1701. 'mysqlnd.collect_memory_statistics': 'Off'
  1702. },
  1703. 'PostgreSQL': {
  1704. 'pgsql.allow_persistent': 'On',
  1705. 'pgsql.auto_reset_persistent': 'Off',
  1706. 'pgsql.max_persistent': -1,
  1707. 'pgsql.max_links': -1,
  1708. 'pgsql.ignore_notice': 0,
  1709. 'pgsql.log_notice': 0
  1710. },
  1711. 'Sybase-CT': {
  1712. 'sybct.allow_persistent': 'On',
  1713. 'sybct.max_persistent': -1,
  1714. 'sybct.max_links': -1,
  1715. 'sybct.min_server_severity': 10,
  1716. 'sybct.min_client_severity': 10
  1717. },
  1718. 'bcmath': {
  1719. 'bcmath.scale': 0
  1720. },
  1721. 'Session': {
  1722. 'session.save_handler': 'files',
  1723. 'session.use_strict_mode': 0,
  1724. 'session.use_cookies': 1,
  1725. 'session.use_only_cookies': 1,
  1726. 'session.name': 'PHPSESSID',
  1727. 'session.auto_start': 0,
  1728. 'session.cookie_lifetime': 0,
  1729. 'session.cookie_path': '/',
  1730. 'session.serialize_handler': 'php',
  1731. 'session.gc_probability': 0,
  1732. 'session.gc_divisor': 1000,
  1733. 'session.gc_maxlifetime': 1440,
  1734. 'session.bug_compat_42': 'Off',
  1735. 'session.bug_compat_warn': 'Off',
  1736. 'session.cache_limiter': 'nocache',
  1737. 'session.cache_expire': '180',
  1738. 'session.use_trans_sid': 0,
  1739. 'session.hash_function': 0,
  1740. 'session.hash_bits_per_character': 5,
  1741. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  1742. },
  1743. 'MSSQL': {
  1744. 'mssql.allow_persistent': 'On',
  1745. 'mssql.max_persistent': -1,
  1746. 'mssql.max_links': -1,
  1747. 'mssql.min_error_severity': 10,
  1748. 'mssql.min_message_severity': 10,
  1749. 'mssql.compatibility_mode': 'Off',
  1750. 'mssql.secure_connection': 'Off'
  1751. },
  1752. 'Tidy': {
  1753. 'tidy.clean_output': 'Off'
  1754. },
  1755. 'soap': {
  1756. 'soap.wsdl_cache_enabled': 1,
  1757. 'soap.wsdl_cache_dir': '"/tmp"',
  1758. 'soap.wsdl_cache_ttl': 86400,
  1759. 'soap.wsdl_cache_limit': 5
  1760. },
  1761. 'ldap': {
  1762. 'ldap.max_links': -1
  1763. },
  1764. },
  1765. },
  1766. }, merge=True) %}
  1767. {%- endif %}
  1768. {%- endif %}
  1769. {%- elif salt['grains.get']('os') == "Debian" %}
  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. 'FreeBSD': {
  2389. 'apache2': {
  2390. 'ini': '/usr/local/etc/php.ini',
  2391. 'module_config': '/usr/local/etc/apache24/modules.d/050_mod_php.conf',
  2392. 'name': 'apache24',
  2393. },
  2394. 'cli': {
  2395. 'ini': '/usr/local/etc/php.ini'
  2396. },
  2397. 'pkgs': {
  2398. 'apache2': 'mod_php' + freebsd_phpng_version,
  2399. 'local_bin': '/usr/local/bin',
  2400. },
  2401. },
  2402. }),
  2403. 'fpm': {
  2404. 'service': {
  2405. 'enabled': True,
  2406. 'opts': {},
  2407. },
  2408. 'config': {
  2409. 'ini': {
  2410. 'opts': {},
  2411. 'settings': {},
  2412. },
  2413. 'conf': {
  2414. 'opts': {},
  2415. 'settings': {},
  2416. },
  2417. },
  2418. 'pools': {
  2419. 'default.conf': {
  2420. 'enabled': False,
  2421. 'opts': {},
  2422. },
  2423. },
  2424. },
  2425. 'hhvm': {
  2426. 'service': {
  2427. 'enabled': True,
  2428. 'opts': {},
  2429. },
  2430. 'config': {
  2431. 'server': {
  2432. 'opts': {},
  2433. 'settings': {},
  2434. },
  2435. 'php': {
  2436. 'opts': {},
  2437. 'settings': {},
  2438. },
  2439. },
  2440. },
  2441. 'cli': {
  2442. 'ini': {
  2443. 'opts': {},
  2444. 'settings': {},
  2445. }
  2446. },
  2447. 'apache2': {
  2448. 'ini': {
  2449. 'opts': {},
  2450. 'settings': {},
  2451. }
  2452. },
  2453. 'xcache': {
  2454. 'ini': {
  2455. 'defaults': {
  2456. 'xcache-common': {
  2457. 'extension': 'xcache.so',
  2458. },
  2459. 'xcache.admin': {
  2460. 'xcache.admin.enable_auth': 'On',
  2461. },
  2462. 'xcache': {
  2463. 'xcache.shm_scheme': '"mmap"',
  2464. 'xcache.size': '60M',
  2465. 'xcache.count': '1',
  2466. 'xcache.slots': '8K',
  2467. 'xcache.ttl': '0',
  2468. 'xcache.gc_interval': '0',
  2469. 'xcache.var_size': '4M',
  2470. 'xcache.var_count': '1',
  2471. 'xcache.var_slots': '8K',
  2472. 'xcache.var_ttl': '0',
  2473. 'xcache.var_maxttl': '0',
  2474. 'xcache.var_gc_interval': '300',
  2475. 'xcache.var_namespace_mode': '0',
  2476. 'xcache.var_namespace': '""',
  2477. 'xcache.readonly_protection': 'Off',
  2478. 'xcache.mmap_path': '"/dev/zero"',
  2479. 'xcache.coredump_directory': '""',
  2480. 'xcache.coredump_type': '0',
  2481. 'xcache.disable_on_crash': 'Off',
  2482. 'xcache.experimental': 'Off',
  2483. 'xcache.cacher': 'On',
  2484. 'xcache.stat': 'On',
  2485. 'xcache.optimizer': 'Off',
  2486. },
  2487. 'xcache.coverager': {
  2488. 'xcache.coverager': 'Off',
  2489. 'xcache.coverager_autostart': 'On',
  2490. 'xcache.coveragedump_directory': '""',
  2491. },
  2492. },
  2493. 'opts': {},
  2494. 'settings': {},
  2495. }
  2496. },
  2497. 'ini': {
  2498. 'defaults': {
  2499. 'PHP': {
  2500. 'engine': 'On',
  2501. 'allow_url_fopen': 'On',
  2502. 'allow_url_include': 'Off',
  2503. 'asp_tags': 'Off',
  2504. 'auto_globals_jit': 'On',
  2505. 'default_mimetype': '"text/html"',
  2506. 'default_socket_timeout': 60,
  2507. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  2508. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  2509. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  2510. 'display_errors': 'Off',
  2511. 'display_startup_errors': 'Off',
  2512. 'enable_dl': 'Off',
  2513. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  2514. 'expose_php': 'On',
  2515. 'file_uploads': 'On',
  2516. 'html_errors': 'On',
  2517. 'ignore_repeated_errors': 'Off',
  2518. 'ignore_repeated_source': 'Off',
  2519. 'implicit_flush': 'Off',
  2520. 'log_errors': 'On',
  2521. 'log_errors_max_len': 1024,
  2522. 'max_execution_time': 30,
  2523. 'max_file_uploads': 20,
  2524. 'max_input_nesting_level': 64,
  2525. 'max_input_time': 60,
  2526. 'max_input_vars': 1000,
  2527. 'memory_limit': '128M',
  2528. 'output_buffering': 4096,
  2529. 'post_max_size': '8M',
  2530. 'precision': 14,
  2531. 'register_argc_argv': 'Off',
  2532. 'report_memleaks': 'On',
  2533. 'request_order': 'GP',
  2534. 'serialize_precision': 17,
  2535. 'short_open_tag': 'Off',
  2536. 'track_errors': 'Off',
  2537. 'upload_max_filesize': '2M',
  2538. 'variables_order': 'GPCS',
  2539. 'zend.enable_gc': 'On',
  2540. 'zlib.output_compression': 'Off',
  2541. },
  2542. 'CLI Server': {
  2543. 'cli_server.color': 'On'
  2544. },
  2545. 'Date': {
  2546. 'date.timezone': 'America/New_York'
  2547. },
  2548. 'Pdo_mysql': {
  2549. 'pdo_mysql.cache_size': 2000
  2550. },
  2551. 'mail function': {
  2552. 'SMTP': 'localhost',
  2553. 'mail.add_x_header': 'On'
  2554. },
  2555. 'SQL': {
  2556. 'sql.safe_mode': 'Off'
  2557. },
  2558. 'ODBC': {
  2559. 'odbc.allow_persistent': 'On',
  2560. 'odbc.check_persistent': 'On',
  2561. 'odbc.max_persistent': '-1',
  2562. 'odbc.max_links': '-1',
  2563. 'odbc.defaultlrl': 4096,
  2564. 'odbc.defaultbinmode': 1
  2565. },
  2566. 'Interbase': {
  2567. 'ibase.allow_persistent': 1,
  2568. 'ibase.max_persistent': -1,
  2569. 'ibase.max_links': -1,
  2570. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  2571. 'ibase.dateformat': '"%Y-%m-%d"',
  2572. 'ibase.timeformat': '"%H:%M:%S"'
  2573. },
  2574. 'MySQL': {
  2575. 'mysql.allow_local_infile': 'On',
  2576. 'mysql.allow_persistent': 'On',
  2577. 'mysql.cache_size': '2000',
  2578. 'mysql.max_persistent': -1,
  2579. 'mysql.max_links': -1,
  2580. 'mysql.connect_timeout': 60,
  2581. 'mysql.trace_mode': 'Off'
  2582. },
  2583. 'MySQLi': {
  2584. 'mysqli.max_persistent': -1,
  2585. 'mysqli.allow_persistent': 'On',
  2586. 'mysqli.max_links': -1,
  2587. 'mysqli.cache_size': 2000,
  2588. 'mysqli.default_port': 3306,
  2589. 'mysqli.reconnect': 'Off'
  2590. },
  2591. 'mysqlnd': {
  2592. 'mysqlnd.collect_statistics': 'On',
  2593. 'mysqlnd.collect_memory_statistics': 'Off'
  2594. },
  2595. 'PostgreSQL': {
  2596. 'pgsql.allow_persistent': 'On',
  2597. 'pgsql.auto_reset_persistent': 'Off',
  2598. 'pgsql.max_persistent': -1,
  2599. 'pgsql.max_links': -1,
  2600. 'pgsql.ignore_notice': 0,
  2601. 'pgsql.log_notice': 0
  2602. },
  2603. 'Sybase-CT': {
  2604. 'sybct.allow_persistent': 'On',
  2605. 'sybct.max_persistent': -1,
  2606. 'sybct.max_links': -1,
  2607. 'sybct.min_server_severity': 10,
  2608. 'sybct.min_client_severity': 10
  2609. },
  2610. 'bcmath': {
  2611. 'bcmath.scale': 0
  2612. },
  2613. 'Session': {
  2614. 'session.save_handler': 'files',
  2615. 'session.use_strict_mode': 0,
  2616. 'session.use_cookies': 1,
  2617. 'session.use_only_cookies': 1,
  2618. 'session.name': 'PHPSESSID',
  2619. 'session.auto_start': 0,
  2620. 'session.cookie_lifetime': 0,
  2621. 'session.cookie_path': '/',
  2622. 'session.serialize_handler': 'php',
  2623. 'session.gc_probability': 0,
  2624. 'session.gc_divisor': 1000,
  2625. 'session.gc_maxlifetime': 1440,
  2626. 'session.bug_compat_42': 'Off',
  2627. 'session.bug_compat_warn': 'Off',
  2628. 'session.cache_limiter': 'nocache',
  2629. 'session.cache_expire': '180',
  2630. 'session.use_trans_sid': 0,
  2631. 'session.hash_function': 0,
  2632. 'session.hash_bits_per_character': 5,
  2633. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  2634. },
  2635. 'MSSQL': {
  2636. 'mssql.allow_persistent': 'On',
  2637. 'mssql.max_persistent': -1,
  2638. 'mssql.max_links': -1,
  2639. 'mssql.min_error_severity': 10,
  2640. 'mssql.min_message_severity': 10,
  2641. 'mssql.compatibility_mode': 'Off',
  2642. 'mssql.secure_connection': 'Off'
  2643. },
  2644. 'Tidy': {
  2645. 'tidy.clean_output': 'Off'
  2646. },
  2647. 'soap': {
  2648. 'soap.wsdl_cache_enabled': 1,
  2649. 'soap.wsdl_cache_dir': '"/tmp"',
  2650. 'soap.wsdl_cache_ttl': 86400,
  2651. 'soap.wsdl_cache_limit': 5
  2652. },
  2653. 'ldap': {
  2654. 'ldap.max_links': -1
  2655. },
  2656. },
  2657. },
  2658. }, merge=True) %}
  2659. {%- endif %}