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.

2677 line
127KB

  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. 'composer_bin': 'composer',
  668. 'curl': 'php-curl',
  669. 'dev': 'php7.1-dev',
  670. 'fpm': 'php-fpm',
  671. 'gd': 'php-gd',
  672. 'geoip': 'php-geoip',
  673. 'geshi': 'php-geshi',
  674. 'gmp': 'php-gmp',
  675. 'hhvm': 'hhvm',
  676. 'imagick': 'php-imagick',
  677. 'imap': 'php-imap',
  678. 'intl': 'php-intl',
  679. 'json': 'php-json',
  680. 'ldap': 'php-ldap',
  681. 'local_bin': '/usr/local/bin',
  682. 'mbstring': 'php-mbstring',
  683. 'mcrypt': 'php-mcrypt',
  684. 'memcache': 'php-memcache',
  685. 'memcached': 'php-memcached',
  686. 'mongodb': 'php-mongodb',
  687. 'mysql': 'php-mysql',
  688. 'mysqlnd': 'php',
  689. 'net4': 'php-net-ipv4',
  690. 'net6': 'php-net-ipv6',
  691. 'oauth': 'php-oauth',
  692. 'opcache': 'php7.1-opcache',
  693. 'pear': 'php-pear',
  694. 'pgsql': 'php-pgsql',
  695. 'php': 'php',
  696. 'phpenmod_command': 'phpenmod',
  697. 'pspell': 'php-pspell',
  698. 'redis': 'php-redis',
  699. 'seclib': ['php-phpseclib', 'php-seclib'],
  700. 'snmp': 'php-snmp',
  701. 'soap': 'php-soap',
  702. 'sqlite': 'php-sqlite3',
  703. 'ssh2': 'php-ssh2',
  704. 'suhosin': 'php',
  705. 'sybase': 'php-sybase',
  706. 'tcpdf': 'php-tcpdf',
  707. 'temp_dir': '/tmp',
  708. 'tidy': 'php7.1-tidy',
  709. 'xcache': 'php',
  710. 'xdebug': 'php-xdebug',
  711. 'xml': 'php-xml',
  712. 'xsl': 'php7.1-xsl',
  713. 'zip': 'php-zip',
  714. },
  715. 'fpm': {
  716. 'conf': '/etc/php/7.1/fpm/php-fpm.conf',
  717. 'ini': '/etc/php/7.1/fpm/php.ini',
  718. 'pools': '/etc/php/7.1/fpm/pool.d',
  719. 'service': 'php7.1-fpm',
  720. 'defaults': odict([
  721. ('global', odict([
  722. ('pid', '/var/run/php7.1-fpm.pid'),
  723. ('error_log', '/var/log/php7.1-fpm.log'),
  724. ])),
  725. ('include', '/etc/php/7.1/fpm/pool.d/*.conf'),
  726. ]),
  727. },
  728. 'hhvm': {
  729. 'conf': '/etc/hhvm/server.ini',
  730. 'ini': '/etc/hhvm/php.ini',
  731. 'service': 'hhvm',
  732. 'defaults': {},
  733. 'server': odict([
  734. ('pid', '/var/run/hhvm/pid'),
  735. ('hhvm.server.port', '9000'),
  736. ('hhvm.server.type', 'fastcgi'),
  737. ('hhvm.server.default_document', 'index.php'),
  738. ('hhvm.log.use_log_file', 'true'),
  739. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  740. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  741. ]),
  742. 'php': odict([
  743. ('session.save_handler', 'files'),
  744. ('session.save_path', '/var/lib/hhvm/sessions'),
  745. ('session.gc_maxlifetime', '1440'),
  746. ('hhvm.log.level', 'Warning'),
  747. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  748. ('hhvm.log.runtime_error_reporting_level', '8191'),
  749. ('hhvm.mysql.typed_results', 'false'),
  750. ]),
  751. },
  752. 'cli': {
  753. 'ini': '/etc/php/7.1/cli/php.ini',
  754. },
  755. 'apache2': {
  756. 'ini': '/etc/php/7.1/apache2/php.ini',
  757. },
  758. 'xcache': {
  759. 'ini': '/etc/php/7.1/mods-available/xcache.ini',
  760. 'defaults': {},
  761. },
  762. },
  763. }, grain="os"),
  764. 'fpm': {
  765. 'service': {
  766. 'enabled': True,
  767. 'opts': {},
  768. },
  769. 'config': {
  770. 'ini': {
  771. 'opts': {},
  772. 'settings': {},
  773. },
  774. 'conf': {
  775. 'opts': {},
  776. 'settings': {},
  777. },
  778. },
  779. 'pools': {
  780. 'default.conf': {
  781. 'enabled': False,
  782. 'opts': {},
  783. },
  784. },
  785. },
  786. 'hhvm': {
  787. 'service': {
  788. 'enabled': True,
  789. 'opts': {},
  790. },
  791. 'config': {
  792. 'server': {
  793. 'opts': {},
  794. 'settings': {},
  795. },
  796. 'php': {
  797. 'opts': {},
  798. 'settings': {},
  799. },
  800. },
  801. },
  802. 'cli': {
  803. 'ini': {
  804. 'opts': {},
  805. 'settings': {},
  806. }
  807. },
  808. 'apache2': {
  809. 'ini': {
  810. 'opts': {},
  811. 'settings': {},
  812. }
  813. },
  814. 'xcache': {
  815. 'ini': {
  816. 'defaults': {
  817. 'xcache-common': {
  818. 'extension': 'xcache.so',
  819. },
  820. 'xcache.admin': {
  821. 'xcache.admin.enable_auth': 'On',
  822. },
  823. 'xcache': {
  824. 'xcache.shm_scheme': '"mmap"',
  825. 'xcache.size': '60M',
  826. 'xcache.count': '1',
  827. 'xcache.slots': '8K',
  828. 'xcache.ttl': '0',
  829. 'xcache.gc_interval': '0',
  830. 'xcache.var_size': '4M',
  831. 'xcache.var_count': '1',
  832. 'xcache.var_slots': '8K',
  833. 'xcache.var_ttl': '0',
  834. 'xcache.var_maxttl': '0',
  835. 'xcache.var_gc_interval': '300',
  836. 'xcache.var_namespace_mode': '0',
  837. 'xcache.var_namespace': '""',
  838. 'xcache.readonly_protection': 'Off',
  839. 'xcache.mmap_path': '"/dev/zero"',
  840. 'xcache.coredump_directory': '""',
  841. 'xcache.coredump_type': '0',
  842. 'xcache.disable_on_crash': 'Off',
  843. 'xcache.experimental': 'Off',
  844. 'xcache.cacher': 'On',
  845. 'xcache.stat': 'On',
  846. 'xcache.optimizer': 'Off',
  847. },
  848. 'xcache.coverager': {
  849. 'xcache.coverager': 'Off',
  850. 'xcache.coverager_autostart': 'On',
  851. 'xcache.coveragedump_directory': '""',
  852. },
  853. },
  854. 'opts': {},
  855. 'settings': {},
  856. }
  857. },
  858. 'ini': {
  859. 'defaults': {
  860. 'PHP': {
  861. 'allow_url_fopen': 'On',
  862. 'allow_url_include': 'Off',
  863. 'asp_tags': 'Off',
  864. 'auto_globals_jit': 'On',
  865. 'default_mimetype': '"text/html"',
  866. 'default_socket_timeout': 60,
  867. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  868. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  869. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  870. 'display_errors': 'Off',
  871. 'display_startup_errors': 'Off',
  872. 'enable_dl': 'Off',
  873. 'engine': 'On',
  874. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  875. 'expose_php': 'On',
  876. 'file_uploads': 'On',
  877. 'html_errors': 'On',
  878. 'ignore_repeated_errors': 'Off',
  879. 'ignore_repeated_source': 'Off',
  880. 'implicit_flush': 'Off',
  881. 'log_errors': 'On',
  882. 'log_errors_max_len': 1024,
  883. 'max_execution_time': 30,
  884. 'max_file_uploads': 20,
  885. 'max_input_nesting_level': 64,
  886. 'max_input_time': 60,
  887. 'max_input_vars': 1000,
  888. 'memory_limit': '128M',
  889. 'output_buffering': 4096,
  890. 'post_max_size': '8M',
  891. 'precision': 14,
  892. 'register_argc_argv': 'Off',
  893. 'report_memleaks': 'On',
  894. 'request_order': 'GP',
  895. 'serialize_precision': 17,
  896. 'short_open_tag': 'Off',
  897. 'track_errors': 'Off',
  898. 'upload_max_filesize': '2M',
  899. 'variables_order': 'GPCS',
  900. 'zend.enable_gc': 'On',
  901. 'zlib.output_compression': 'Off',
  902. },
  903. 'CLI Server': {
  904. 'cli_server.color': 'On'
  905. },
  906. 'Date': {
  907. 'date.timezone': 'America/New_York'
  908. },
  909. 'Pdo_mysql': {
  910. 'pdo_mysql.cache_size': 2000
  911. },
  912. 'mail function': {
  913. 'SMTP': 'localhost',
  914. 'mail.add_x_header': 'On'
  915. },
  916. 'SQL': {
  917. 'sql.safe_mode': 'Off'
  918. },
  919. 'ODBC': {
  920. 'odbc.allow_persistent': 'On',
  921. 'odbc.check_persistent': 'On',
  922. 'odbc.max_persistent': '-1',
  923. 'odbc.max_links': '-1',
  924. 'odbc.defaultlrl': 4096,
  925. 'odbc.defaultbinmode': 1
  926. },
  927. 'Interbase': {
  928. 'ibase.allow_persistent': 1,
  929. 'ibase.max_persistent': -1,
  930. 'ibase.max_links': -1,
  931. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  932. 'ibase.dateformat': '"%Y-%m-%d"',
  933. 'ibase.timeformat': '"%H:%M:%S"'
  934. },
  935. 'MySQL': {
  936. 'mysql.allow_local_infile': 'On',
  937. 'mysql.allow_persistent': 'On',
  938. 'mysql.cache_size': '2000',
  939. 'mysql.max_persistent': -1,
  940. 'mysql.max_links': -1,
  941. 'mysql.connect_timeout': 60,
  942. 'mysql.trace_mode': 'Off'
  943. },
  944. 'MySQLi': {
  945. 'mysqli.max_persistent': -1,
  946. 'mysqli.allow_persistent': 'On',
  947. 'mysqli.max_links': -1,
  948. 'mysqli.cache_size': 2000,
  949. 'mysqli.default_port': 3306,
  950. 'mysqli.reconnect': 'Off'
  951. },
  952. 'mysqlnd': {
  953. 'mysqlnd.collect_statistics': 'On',
  954. 'mysqlnd.collect_memory_statistics': 'Off'
  955. },
  956. 'PostgreSQL': {
  957. 'pgsql.allow_persistent': 'On',
  958. 'pgsql.auto_reset_persistent': 'Off',
  959. 'pgsql.max_persistent': -1,
  960. 'pgsql.max_links': -1,
  961. 'pgsql.ignore_notice': 0,
  962. 'pgsql.log_notice': 0
  963. },
  964. 'Sybase-CT': {
  965. 'sybct.allow_persistent': 'On',
  966. 'sybct.max_persistent': -1,
  967. 'sybct.max_links': -1,
  968. 'sybct.min_server_severity': 10,
  969. 'sybct.min_client_severity': 10
  970. },
  971. 'bcmath': {
  972. 'bcmath.scale': 0
  973. },
  974. 'Session': {
  975. 'session.save_handler': 'files',
  976. 'session.use_strict_mode': 0,
  977. 'session.use_cookies': 1,
  978. 'session.use_only_cookies': 1,
  979. 'session.name': 'PHPSESSID',
  980. 'session.auto_start': 0,
  981. 'session.cookie_lifetime': 0,
  982. 'session.cookie_path': '/',
  983. 'session.serialize_handler': 'php',
  984. 'session.gc_probability': 0,
  985. 'session.gc_divisor': 1000,
  986. 'session.gc_maxlifetime': 1440,
  987. 'session.bug_compat_42': 'Off',
  988. 'session.bug_compat_warn': 'Off',
  989. 'session.cache_limiter': 'nocache',
  990. 'session.cache_expire': '180',
  991. 'session.use_trans_sid': 0,
  992. 'session.hash_function': 0,
  993. 'session.hash_bits_per_character': 5,
  994. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  995. },
  996. 'MSSQL': {
  997. 'mssql.allow_persistent': 'On',
  998. 'mssql.max_persistent': -1,
  999. 'mssql.max_links': -1,
  1000. 'mssql.min_error_severity': 10,
  1001. 'mssql.min_message_severity': 10,
  1002. 'mssql.compatibility_mode': 'Off',
  1003. 'mssql.secure_connection': 'Off'
  1004. },
  1005. 'Tidy': {
  1006. 'tidy.clean_output': 'Off'
  1007. },
  1008. 'soap': {
  1009. 'soap.wsdl_cache_enabled': 1,
  1010. 'soap.wsdl_cache_dir': '"/tmp"',
  1011. 'soap.wsdl_cache_ttl': 86400,
  1012. 'soap.wsdl_cache_limit': 5
  1013. },
  1014. 'ldap': {
  1015. 'ldap.max_links': -1
  1016. },
  1017. },
  1018. },
  1019. }, merge=True) %}
  1020. {%- elif salt['grains.get']('osrelease')|string >= '16.04' %}
  1021. {%- set php = salt['pillar.get']('php:ng', {
  1022. 'lookup': salt['grains.filter_by']({
  1023. 'Ubuntu': {
  1024. 'pkgs': {
  1025. 'adodb': 'libphp-adodb',
  1026. 'apache2': 'libapache2-mod-php',
  1027. 'apc': 'php',
  1028. 'apcu': 'php-apcu',
  1029. 'bcmath': 'php7.0-bcmath',
  1030. 'cache-lite': 'php-cache-lite',
  1031. 'cgi': 'php-cgi',
  1032. 'cli': 'php-cli',
  1033. 'console-table': 'php-console-table',
  1034. 'composer_bin': 'composer',
  1035. 'curl': 'php-curl',
  1036. 'dev': 'php7.0-dev',
  1037. 'fpm': 'php-fpm',
  1038. 'gd': 'php-gd',
  1039. 'geoip': 'php-geoip',
  1040. 'geshi': 'php-geshi',
  1041. 'gmp': 'php-gmp',
  1042. 'hhvm': 'hhvm',
  1043. 'imagick': 'php-imagick',
  1044. 'imap': 'php-imap',
  1045. 'intl': 'php-intl',
  1046. 'json': 'php-json',
  1047. 'ldap': 'php-ldap',
  1048. 'local_bin': '/usr/local/bin',
  1049. 'mbstring': 'php-mbstring',
  1050. 'mcrypt': 'php-mcrypt',
  1051. 'memcache': 'php-memcache',
  1052. 'memcached': 'php-memcached',
  1053. 'mongodb': 'php-mongodb',
  1054. 'mysql': 'php-mysql',
  1055. 'mysqlnd': 'php',
  1056. 'net4': 'php-net-ipv4',
  1057. 'net6': 'php-net-ipv6',
  1058. 'oauth': 'php-oauth',
  1059. 'opcache': 'php7.0-opcache',
  1060. 'pear': 'php-pear',
  1061. 'pgsql': 'php-pgsql',
  1062. 'php': 'php',
  1063. 'phpenmod_command': 'phpenmod',
  1064. 'pspell': 'php-pspell',
  1065. 'redis': 'php-redis',
  1066. 'seclib': ['php-phpseclib', 'php-seclib'],
  1067. 'snmp': 'php-snmp',
  1068. 'soap': 'php-soap',
  1069. 'sqlite': 'php-sqlite3',
  1070. 'ssh2': 'php-ssh2',
  1071. 'suhosin': 'php',
  1072. 'sybase': 'php-sybase',
  1073. 'tcpdf': 'php-tcpdf',
  1074. 'temp_dir': '/tmp',
  1075. 'tidy': 'php7.0-tidy',
  1076. 'xcache': 'php',
  1077. 'xdebug': 'php-xdebug',
  1078. 'xml': 'php-xml',
  1079. 'xsl': 'php7.0-xsl',
  1080. 'zip': 'php-zip',
  1081. },
  1082. 'fpm': {
  1083. 'conf': '/etc/php/7.0/fpm/php-fpm.conf',
  1084. 'ini': '/etc/php/7.0/fpm/php.ini',
  1085. 'pools': '/etc/php/7.0/fpm/pool.d',
  1086. 'service': 'php7.0-fpm',
  1087. 'defaults': odict([
  1088. ('global', odict([
  1089. ('pid', '/var/run/php7.0-fpm.pid'),
  1090. ('error_log', '/var/log/php7.0-fpm.log'),
  1091. ])),
  1092. ('include', '/etc/php/7.0/fpm/pool.d/*.conf'),
  1093. ]),
  1094. },
  1095. 'hhvm': {
  1096. 'conf': '/etc/hhvm/server.ini',
  1097. 'ini': '/etc/hhvm/php.ini',
  1098. 'service': 'hhvm',
  1099. 'defaults': {},
  1100. 'server': odict([
  1101. ('pid', '/var/run/hhvm/pid'),
  1102. ('hhvm.server.port', '9000'),
  1103. ('hhvm.server.type', 'fastcgi'),
  1104. ('hhvm.server.default_document', 'index.php'),
  1105. ('hhvm.log.use_log_file', 'true'),
  1106. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  1107. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  1108. ]),
  1109. 'php': odict([
  1110. ('session.save_handler', 'files'),
  1111. ('session.save_path', '/var/lib/hhvm/sessions'),
  1112. ('session.gc_maxlifetime', '1440'),
  1113. ('hhvm.log.level', 'Warning'),
  1114. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  1115. ('hhvm.log.runtime_error_reporting_level', '8191'),
  1116. ('hhvm.mysql.typed_results', 'false'),
  1117. ]),
  1118. },
  1119. 'cli': {
  1120. 'ini': '/etc/php/7.0/cli/php.ini',
  1121. },
  1122. 'apache2': {
  1123. 'ini': '/etc/php/7.0/apache2/php.ini',
  1124. },
  1125. 'xcache': {
  1126. 'ini': '/etc/php/7.0/mods-available/xcache.ini',
  1127. 'defaults': {},
  1128. },
  1129. },
  1130. }, grain="os"),
  1131. 'fpm': {
  1132. 'service': {
  1133. 'enabled': True,
  1134. 'opts': {},
  1135. },
  1136. 'config': {
  1137. 'ini': {
  1138. 'opts': {},
  1139. 'settings': {},
  1140. },
  1141. 'conf': {
  1142. 'opts': {},
  1143. 'settings': {},
  1144. },
  1145. },
  1146. 'pools': {
  1147. 'default.conf': {
  1148. 'enabled': False,
  1149. 'opts': {},
  1150. },
  1151. },
  1152. },
  1153. 'hhvm': {
  1154. 'service': {
  1155. 'enabled': True,
  1156. 'opts': {},
  1157. },
  1158. 'config': {
  1159. 'server': {
  1160. 'opts': {},
  1161. 'settings': {},
  1162. },
  1163. 'php': {
  1164. 'opts': {},
  1165. 'settings': {},
  1166. },
  1167. },
  1168. },
  1169. 'cli': {
  1170. 'ini': {
  1171. 'opts': {},
  1172. 'settings': {},
  1173. }
  1174. },
  1175. 'apache2': {
  1176. 'ini': {
  1177. 'opts': {},
  1178. 'settings': {},
  1179. }
  1180. },
  1181. 'xcache': {
  1182. 'ini': {
  1183. 'defaults': {
  1184. 'xcache-common': {
  1185. 'extension': 'xcache.so',
  1186. },
  1187. 'xcache.admin': {
  1188. 'xcache.admin.enable_auth': 'On',
  1189. },
  1190. 'xcache': {
  1191. 'xcache.shm_scheme': '"mmap"',
  1192. 'xcache.size': '60M',
  1193. 'xcache.count': '1',
  1194. 'xcache.slots': '8K',
  1195. 'xcache.ttl': '0',
  1196. 'xcache.gc_interval': '0',
  1197. 'xcache.var_size': '4M',
  1198. 'xcache.var_count': '1',
  1199. 'xcache.var_slots': '8K',
  1200. 'xcache.var_ttl': '0',
  1201. 'xcache.var_maxttl': '0',
  1202. 'xcache.var_gc_interval': '300',
  1203. 'xcache.var_namespace_mode': '0',
  1204. 'xcache.var_namespace': '""',
  1205. 'xcache.readonly_protection': 'Off',
  1206. 'xcache.mmap_path': '"/dev/zero"',
  1207. 'xcache.coredump_directory': '""',
  1208. 'xcache.coredump_type': '0',
  1209. 'xcache.disable_on_crash': 'Off',
  1210. 'xcache.experimental': 'Off',
  1211. 'xcache.cacher': 'On',
  1212. 'xcache.stat': 'On',
  1213. 'xcache.optimizer': 'Off',
  1214. },
  1215. 'xcache.coverager': {
  1216. 'xcache.coverager': 'Off',
  1217. 'xcache.coverager_autostart': 'On',
  1218. 'xcache.coveragedump_directory': '""',
  1219. },
  1220. },
  1221. 'opts': {},
  1222. 'settings': {},
  1223. }
  1224. },
  1225. 'ini': {
  1226. 'defaults': {
  1227. 'PHP': {
  1228. 'allow_url_fopen': 'On',
  1229. 'allow_url_include': 'Off',
  1230. 'asp_tags': 'Off',
  1231. 'auto_globals_jit': 'On',
  1232. 'default_mimetype': '"text/html"',
  1233. 'default_socket_timeout': 60,
  1234. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  1235. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  1236. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  1237. 'display_errors': 'Off',
  1238. 'display_startup_errors': 'Off',
  1239. 'enable_dl': 'Off',
  1240. 'engine': 'On',
  1241. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  1242. 'expose_php': 'On',
  1243. 'file_uploads': 'On',
  1244. 'html_errors': 'On',
  1245. 'ignore_repeated_errors': 'Off',
  1246. 'ignore_repeated_source': 'Off',
  1247. 'implicit_flush': 'Off',
  1248. 'log_errors': 'On',
  1249. 'log_errors_max_len': 1024,
  1250. 'max_execution_time': 30,
  1251. 'max_file_uploads': 20,
  1252. 'max_input_nesting_level': 64,
  1253. 'max_input_time': 60,
  1254. 'max_input_vars': 1000,
  1255. 'memory_limit': '128M',
  1256. 'output_buffering': 4096,
  1257. 'post_max_size': '8M',
  1258. 'precision': 14,
  1259. 'register_argc_argv': 'Off',
  1260. 'report_memleaks': 'On',
  1261. 'request_order': 'GP',
  1262. 'serialize_precision': 17,
  1263. 'short_open_tag': 'Off',
  1264. 'track_errors': 'Off',
  1265. 'upload_max_filesize': '2M',
  1266. 'variables_order': 'GPCS',
  1267. 'zend.enable_gc': 'On',
  1268. 'zlib.output_compression': 'Off',
  1269. },
  1270. 'CLI Server': {
  1271. 'cli_server.color': 'On'
  1272. },
  1273. 'Date': {
  1274. 'date.timezone': 'America/New_York'
  1275. },
  1276. 'Pdo_mysql': {
  1277. 'pdo_mysql.cache_size': 2000
  1278. },
  1279. 'mail function': {
  1280. 'SMTP': 'localhost',
  1281. 'mail.add_x_header': 'On'
  1282. },
  1283. 'SQL': {
  1284. 'sql.safe_mode': 'Off'
  1285. },
  1286. 'ODBC': {
  1287. 'odbc.allow_persistent': 'On',
  1288. 'odbc.check_persistent': 'On',
  1289. 'odbc.max_persistent': '-1',
  1290. 'odbc.max_links': '-1',
  1291. 'odbc.defaultlrl': 4096,
  1292. 'odbc.defaultbinmode': 1
  1293. },
  1294. 'Interbase': {
  1295. 'ibase.allow_persistent': 1,
  1296. 'ibase.max_persistent': -1,
  1297. 'ibase.max_links': -1,
  1298. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  1299. 'ibase.dateformat': '"%Y-%m-%d"',
  1300. 'ibase.timeformat': '"%H:%M:%S"'
  1301. },
  1302. 'MySQL': {
  1303. 'mysql.allow_local_infile': 'On',
  1304. 'mysql.allow_persistent': 'On',
  1305. 'mysql.cache_size': '2000',
  1306. 'mysql.max_persistent': -1,
  1307. 'mysql.max_links': -1,
  1308. 'mysql.connect_timeout': 60,
  1309. 'mysql.trace_mode': 'Off'
  1310. },
  1311. 'MySQLi': {
  1312. 'mysqli.max_persistent': -1,
  1313. 'mysqli.allow_persistent': 'On',
  1314. 'mysqli.max_links': -1,
  1315. 'mysqli.cache_size': 2000,
  1316. 'mysqli.default_port': 3306,
  1317. 'mysqli.reconnect': 'Off'
  1318. },
  1319. 'mysqlnd': {
  1320. 'mysqlnd.collect_statistics': 'On',
  1321. 'mysqlnd.collect_memory_statistics': 'Off'
  1322. },
  1323. 'PostgreSQL': {
  1324. 'pgsql.allow_persistent': 'On',
  1325. 'pgsql.auto_reset_persistent': 'Off',
  1326. 'pgsql.max_persistent': -1,
  1327. 'pgsql.max_links': -1,
  1328. 'pgsql.ignore_notice': 0,
  1329. 'pgsql.log_notice': 0
  1330. },
  1331. 'Sybase-CT': {
  1332. 'sybct.allow_persistent': 'On',
  1333. 'sybct.max_persistent': -1,
  1334. 'sybct.max_links': -1,
  1335. 'sybct.min_server_severity': 10,
  1336. 'sybct.min_client_severity': 10
  1337. },
  1338. 'bcmath': {
  1339. 'bcmath.scale': 0
  1340. },
  1341. 'Session': {
  1342. 'session.save_handler': 'files',
  1343. 'session.use_strict_mode': 0,
  1344. 'session.use_cookies': 1,
  1345. 'session.use_only_cookies': 1,
  1346. 'session.name': 'PHPSESSID',
  1347. 'session.auto_start': 0,
  1348. 'session.cookie_lifetime': 0,
  1349. 'session.cookie_path': '/',
  1350. 'session.serialize_handler': 'php',
  1351. 'session.gc_probability': 0,
  1352. 'session.gc_divisor': 1000,
  1353. 'session.gc_maxlifetime': 1440,
  1354. 'session.bug_compat_42': 'Off',
  1355. 'session.bug_compat_warn': 'Off',
  1356. 'session.cache_limiter': 'nocache',
  1357. 'session.cache_expire': '180',
  1358. 'session.use_trans_sid': 0,
  1359. 'session.hash_function': 0,
  1360. 'session.hash_bits_per_character': 5,
  1361. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  1362. },
  1363. 'MSSQL': {
  1364. 'mssql.allow_persistent': 'On',
  1365. 'mssql.max_persistent': -1,
  1366. 'mssql.max_links': -1,
  1367. 'mssql.min_error_severity': 10,
  1368. 'mssql.min_message_severity': 10,
  1369. 'mssql.compatibility_mode': 'Off',
  1370. 'mssql.secure_connection': 'Off'
  1371. },
  1372. 'Tidy': {
  1373. 'tidy.clean_output': 'Off'
  1374. },
  1375. 'soap': {
  1376. 'soap.wsdl_cache_enabled': 1,
  1377. 'soap.wsdl_cache_dir': '"/tmp"',
  1378. 'soap.wsdl_cache_ttl': 86400,
  1379. 'soap.wsdl_cache_limit': 5
  1380. },
  1381. 'ldap': {
  1382. 'ldap.max_links': -1
  1383. },
  1384. },
  1385. },
  1386. }, merge=True) %}
  1387. {%- else %}
  1388. {%- set php = salt['pillar.get']('php:ng', {
  1389. 'lookup': salt['grains.filter_by']({
  1390. 'Ubuntu': {
  1391. 'pkgs': {
  1392. 'adodb': 'php5-adodb',
  1393. 'apache2': 'libapache2-mod-php5',
  1394. 'apc': 'php-apc',
  1395. 'apcu': 'php5-apcu',
  1396. 'bcmath': 'php5',
  1397. 'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev'],
  1398. 'cache-lite': 'php-cache-lite',
  1399. 'cgi': 'php5-cgi',
  1400. 'cli': 'php5-cli',
  1401. 'composer_bin': 'composer',
  1402. 'console-table': 'php-console-table',
  1403. 'curl': 'php5-curl',
  1404. 'dev': ['php5-dev','build-essential'],
  1405. 'ext_conf_path': salt['grains.filter_by']({
  1406. 'precise': '/etc/php5/conf.d',
  1407. 'default': '/etc/php5/mods-available',
  1408. }, grain='oscodename'),
  1409. 'fpm': 'php5-fpm',
  1410. 'gd': 'php5-gd',
  1411. 'gearman': 'php5-gearman',
  1412. 'geoip': 'php5-geoip',
  1413. 'geshi': 'php-geshi',
  1414. 'gettext': 'php-gettext',
  1415. 'gmp': 'php5-gmp',
  1416. 'hhvm': 'hhvm',
  1417. 'imagick': 'php5-imagick',
  1418. 'imap': 'php5-imap',
  1419. 'intl': 'php5-intl',
  1420. 'json': 'php5-json',
  1421. 'ldap': 'php5-ldap',
  1422. 'local_bin': '/usr/local/bin',
  1423. 'mbstring': 'php5',
  1424. 'mcrypt': 'php5-mcrypt',
  1425. 'mdb2': 'php-mdb2',
  1426. 'mdb2-driver-mysql': 'php-mdb2-driver-mysql',
  1427. 'mdb2-driver-pgsql': 'php-mdb2-driver-pgsql',
  1428. 'memcache': 'php5-memcache',
  1429. 'memcached': 'php5-memcached',
  1430. 'mongodb': salt['grains.filter_by']({
  1431. 'trusty': 'php5-mongo',
  1432. 'default': '',
  1433. }, grain='oscodename'),
  1434. 'mysql': 'php5-mysql',
  1435. 'mysqlnd': 'php5-mysqlnd',
  1436. 'net4': 'php-net-ipv4',
  1437. 'net6': 'php-net-ipv6',
  1438. 'oauth': 'php5-oauth',
  1439. 'opcache': 'php5',
  1440. 'pear': 'php-pear',
  1441. 'pgsql': 'php5-pgsql',
  1442. 'php': 'php5',
  1443. 'phpenmod_command': salt['grains.filter_by']({
  1444. 'precise': 'true',
  1445. 'default': 'php5enmod',
  1446. }, grain='oscodename'),
  1447. 'pspell': 'php5-pspell',
  1448. 'redis': 'php5-redis',
  1449. 'seclib': 'php-seclib',
  1450. 'snmp': 'php5-snmp',
  1451. 'soap': 'php-soap',
  1452. 'sqlite': 'php5-sqlite',
  1453. 'ssh2': 'libssh2-php',
  1454. 'suhosin5_ext': 'suhosin.so',
  1455. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  1456. 'suhosin7_ext': 'suhosin7.so',
  1457. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  1458. 'svn': 'php5-svn',
  1459. 'tcpdf': 'php-tcpdf',
  1460. 'tidy': 'php5-tidy',
  1461. 'temp_dir': '/tmp',
  1462. 'xcache': 'php5-xcache',
  1463. 'xdebug': 'php5-xdebug',
  1464. 'xml': 'php5',
  1465. 'xsl': 'php5-xsl',
  1466. 'zip': 'php5',
  1467. },
  1468. 'fpm': {
  1469. 'conf': '/etc/php5/fpm/php-fpm.conf',
  1470. 'ini': '/etc/php5/fpm/php.ini',
  1471. 'pools': '/etc/php5/fpm/pool.d',
  1472. 'service': 'php5-fpm',
  1473. 'defaults': odict([
  1474. ('global', odict([
  1475. ('pid', '/var/run/php5-fpm.pid'),
  1476. ('error_log', '/var/log/php5-fpm.log'),
  1477. ])),
  1478. ('include', '/etc/php5/fpm/pool.d/*.conf'),
  1479. ]),
  1480. },
  1481. 'hhvm': {
  1482. 'conf': '/etc/hhvm/server.ini',
  1483. 'ini': '/etc/hhvm/php.ini',
  1484. 'service': 'hhvm',
  1485. 'defaults': {},
  1486. 'server': odict([
  1487. ('pid', '/var/run/hhvm/pid'),
  1488. ('hhvm.server.port', '9000'),
  1489. ('hhvm.server.type', 'fastcgi'),
  1490. ('hhvm.server.default_document', 'index.php'),
  1491. ('hhvm.log.use_log_file', 'true'),
  1492. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  1493. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  1494. ]),
  1495. 'php': odict([
  1496. ('session.save_handler', 'files'),
  1497. ('session.save_path', '/var/lib/hhvm/sessions'),
  1498. ('session.gc_maxlifetime', '1440'),
  1499. ('hhvm.log.level', 'Warning'),
  1500. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  1501. ('hhvm.log.runtime_error_reporting_level', '8191'),
  1502. ('hhvm.mysql.typed_results', 'false'),
  1503. ]),
  1504. },
  1505. 'cli': {
  1506. 'ini': '/etc/php5/cli/php.ini',
  1507. },
  1508. 'apache2': {
  1509. 'ini': '/etc/php5/apache2/php.ini',
  1510. },
  1511. 'xcache': {
  1512. 'ini': '/etc/php5/mods-available/xcache.ini',
  1513. 'defaults': {},
  1514. },
  1515. },
  1516. }, grain="os"),
  1517. 'fpm': {
  1518. 'service': {
  1519. 'enabled': True,
  1520. 'opts': {},
  1521. },
  1522. 'config': {
  1523. 'ini': {
  1524. 'opts': {},
  1525. 'settings': {},
  1526. },
  1527. 'conf': {
  1528. 'opts': {},
  1529. 'settings': {},
  1530. },
  1531. },
  1532. 'pools': {
  1533. 'default.conf': {
  1534. 'enabled': False,
  1535. 'opts': {},
  1536. },
  1537. },
  1538. },
  1539. 'hhvm': {
  1540. 'service': {
  1541. 'enabled': True,
  1542. 'opts': {},
  1543. },
  1544. 'config': {
  1545. 'server': {
  1546. 'opts': {},
  1547. 'settings': {},
  1548. },
  1549. 'php': {
  1550. 'opts': {},
  1551. 'settings': {},
  1552. },
  1553. },
  1554. },
  1555. 'cli': {
  1556. 'ini': {
  1557. 'opts': {},
  1558. 'settings': {},
  1559. }
  1560. },
  1561. 'apache2': {
  1562. 'ini': {
  1563. 'opts': {},
  1564. 'settings': {},
  1565. }
  1566. },
  1567. 'xcache': {
  1568. 'ini': {
  1569. 'defaults': {
  1570. 'xcache-common': {
  1571. 'extension': 'xcache.so',
  1572. },
  1573. 'xcache.admin': {
  1574. 'xcache.admin.enable_auth': 'On',
  1575. },
  1576. 'xcache': {
  1577. 'xcache.shm_scheme': '"mmap"',
  1578. 'xcache.size': '60M',
  1579. 'xcache.count': '1',
  1580. 'xcache.slots': '8K',
  1581. 'xcache.ttl': '0',
  1582. 'xcache.gc_interval': '0',
  1583. 'xcache.var_size': '4M',
  1584. 'xcache.var_count': '1',
  1585. 'xcache.var_slots': '8K',
  1586. 'xcache.var_ttl': '0',
  1587. 'xcache.var_maxttl': '0',
  1588. 'xcache.var_gc_interval': '300',
  1589. 'xcache.var_namespace_mode': '0',
  1590. 'xcache.var_namespace': '""',
  1591. 'xcache.readonly_protection': 'Off',
  1592. 'xcache.mmap_path': '"/dev/zero"',
  1593. 'xcache.coredump_directory': '""',
  1594. 'xcache.coredump_type': '0',
  1595. 'xcache.disable_on_crash': 'Off',
  1596. 'xcache.experimental': 'Off',
  1597. 'xcache.cacher': 'On',
  1598. 'xcache.stat': 'On',
  1599. 'xcache.optimizer': 'Off',
  1600. },
  1601. 'xcache.coverager': {
  1602. 'xcache.coverager': 'Off',
  1603. 'xcache.coverager_autostart': 'On',
  1604. 'xcache.coveragedump_directory': '""',
  1605. },
  1606. },
  1607. 'opts': {},
  1608. 'settings': {},
  1609. }
  1610. },
  1611. 'ini': {
  1612. 'defaults': {
  1613. 'PHP': {
  1614. 'allow_url_fopen': 'On',
  1615. 'allow_url_include': 'Off',
  1616. 'asp_tags': 'Off',
  1617. 'auto_globals_jit': 'On',
  1618. 'default_mimetype': '"text/html"',
  1619. 'default_socket_timeout': 60,
  1620. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  1621. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  1622. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  1623. 'display_errors': 'Off',
  1624. 'display_startup_errors': 'Off',
  1625. 'enable_dl': 'Off',
  1626. 'engine': 'On',
  1627. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  1628. 'expose_php': 'On',
  1629. 'file_uploads': 'On',
  1630. 'html_errors': 'On',
  1631. 'ignore_repeated_errors': 'Off',
  1632. 'ignore_repeated_source': 'Off',
  1633. 'implicit_flush': 'Off',
  1634. 'log_errors': 'On',
  1635. 'log_errors_max_len': 1024,
  1636. 'max_execution_time': 30,
  1637. 'max_file_uploads': 20,
  1638. 'max_input_nesting_level': 64,
  1639. 'max_input_time': 60,
  1640. 'max_input_vars': 1000,
  1641. 'memory_limit': '128M',
  1642. 'output_buffering': 4096,
  1643. 'post_max_size': '8M',
  1644. 'precision': 14,
  1645. 'register_argc_argv': 'Off',
  1646. 'report_memleaks': 'On',
  1647. 'request_order': 'GP',
  1648. 'serialize_precision': 17,
  1649. 'short_open_tag': 'Off',
  1650. 'track_errors': 'Off',
  1651. 'upload_max_filesize': '2M',
  1652. 'variables_order': 'GPCS',
  1653. 'zend.enable_gc': 'On',
  1654. 'zlib.output_compression': 'Off',
  1655. },
  1656. 'CLI Server': {
  1657. 'cli_server.color': 'On'
  1658. },
  1659. 'Date': {
  1660. 'date.timezone': 'America/New_York'
  1661. },
  1662. 'Pdo_mysql': {
  1663. 'pdo_mysql.cache_size': 2000
  1664. },
  1665. 'mail function': {
  1666. 'SMTP': 'localhost',
  1667. 'mail.add_x_header': 'On'
  1668. },
  1669. 'SQL': {
  1670. 'sql.safe_mode': 'Off'
  1671. },
  1672. 'ODBC': {
  1673. 'odbc.allow_persistent': 'On',
  1674. 'odbc.check_persistent': 'On',
  1675. 'odbc.max_persistent': '-1',
  1676. 'odbc.max_links': '-1',
  1677. 'odbc.defaultlrl': 4096,
  1678. 'odbc.defaultbinmode': 1
  1679. },
  1680. 'Interbase': {
  1681. 'ibase.allow_persistent': 1,
  1682. 'ibase.max_persistent': -1,
  1683. 'ibase.max_links': -1,
  1684. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  1685. 'ibase.dateformat': '"%Y-%m-%d"',
  1686. 'ibase.timeformat': '"%H:%M:%S"'
  1687. },
  1688. 'MySQL': {
  1689. 'mysql.allow_local_infile': 'On',
  1690. 'mysql.allow_persistent': 'On',
  1691. 'mysql.cache_size': '2000',
  1692. 'mysql.max_persistent': -1,
  1693. 'mysql.max_links': -1,
  1694. 'mysql.connect_timeout': 60,
  1695. 'mysql.trace_mode': 'Off'
  1696. },
  1697. 'MySQLi': {
  1698. 'mysqli.max_persistent': -1,
  1699. 'mysqli.allow_persistent': 'On',
  1700. 'mysqli.max_links': -1,
  1701. 'mysqli.cache_size': 2000,
  1702. 'mysqli.default_port': 3306,
  1703. 'mysqli.reconnect': 'Off'
  1704. },
  1705. 'mysqlnd': {
  1706. 'mysqlnd.collect_statistics': 'On',
  1707. 'mysqlnd.collect_memory_statistics': 'Off'
  1708. },
  1709. 'PostgreSQL': {
  1710. 'pgsql.allow_persistent': 'On',
  1711. 'pgsql.auto_reset_persistent': 'Off',
  1712. 'pgsql.max_persistent': -1,
  1713. 'pgsql.max_links': -1,
  1714. 'pgsql.ignore_notice': 0,
  1715. 'pgsql.log_notice': 0
  1716. },
  1717. 'Sybase-CT': {
  1718. 'sybct.allow_persistent': 'On',
  1719. 'sybct.max_persistent': -1,
  1720. 'sybct.max_links': -1,
  1721. 'sybct.min_server_severity': 10,
  1722. 'sybct.min_client_severity': 10
  1723. },
  1724. 'bcmath': {
  1725. 'bcmath.scale': 0
  1726. },
  1727. 'Session': {
  1728. 'session.save_handler': 'files',
  1729. 'session.use_strict_mode': 0,
  1730. 'session.use_cookies': 1,
  1731. 'session.use_only_cookies': 1,
  1732. 'session.name': 'PHPSESSID',
  1733. 'session.auto_start': 0,
  1734. 'session.cookie_lifetime': 0,
  1735. 'session.cookie_path': '/',
  1736. 'session.serialize_handler': 'php',
  1737. 'session.gc_probability': 0,
  1738. 'session.gc_divisor': 1000,
  1739. 'session.gc_maxlifetime': 1440,
  1740. 'session.bug_compat_42': 'Off',
  1741. 'session.bug_compat_warn': 'Off',
  1742. 'session.cache_limiter': 'nocache',
  1743. 'session.cache_expire': '180',
  1744. 'session.use_trans_sid': 0,
  1745. 'session.hash_function': 0,
  1746. 'session.hash_bits_per_character': 5,
  1747. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  1748. },
  1749. 'MSSQL': {
  1750. 'mssql.allow_persistent': 'On',
  1751. 'mssql.max_persistent': -1,
  1752. 'mssql.max_links': -1,
  1753. 'mssql.min_error_severity': 10,
  1754. 'mssql.min_message_severity': 10,
  1755. 'mssql.compatibility_mode': 'Off',
  1756. 'mssql.secure_connection': 'Off'
  1757. },
  1758. 'Tidy': {
  1759. 'tidy.clean_output': 'Off'
  1760. },
  1761. 'soap': {
  1762. 'soap.wsdl_cache_enabled': 1,
  1763. 'soap.wsdl_cache_dir': '"/tmp"',
  1764. 'soap.wsdl_cache_ttl': 86400,
  1765. 'soap.wsdl_cache_limit': 5
  1766. },
  1767. 'ldap': {
  1768. 'ldap.max_links': -1
  1769. },
  1770. },
  1771. },
  1772. }, merge=True) %}
  1773. {%- endif %}
  1774. {%- endif %}
  1775. {%- elif salt['grains.get']('os') == "Debian" %}
  1776. {%- if phpng_version|string == '5' %}
  1777. {%- set confdir = '/etc/php5' %}
  1778. {%- else %}
  1779. {%- set confdir = '/etc/php/' + phpng_version %}
  1780. {%- endif %}
  1781. {%- set php = salt['pillar.get']('php:ng', {
  1782. 'lookup': salt['grains.filter_by']({
  1783. 'Debian': {
  1784. 'pkgs': {
  1785. 'adodb': 'libphp-adodb',
  1786. 'apache2': 'libapache2-mod-php' + phpng_version,
  1787. 'apc': 'php-apcu',
  1788. 'apcu': 'php-apcu-bc',
  1789. 'bcmath': 'php' + phpng_version + '-bcmath',
  1790. 'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev', 'pkg-config', 'libsslcommon2-dev', 'gcc', 'make', 'autoconf', 'libc-dev', 'pkg-config'],
  1791. 'cache-lite': 'php-cache-lite',
  1792. 'cgi': 'php' + phpng_version + '-cgi',
  1793. 'cli': 'php' + phpng_version + '-cli',
  1794. 'composer_bin': 'composer',
  1795. 'console-table': 'php-console-table',
  1796. 'curl': 'php' + phpng_version + '-curl',
  1797. 'dev': 'php' + phpng_version + '-dev',
  1798. 'ext_conf_path': '/etc/php/' + phpng_version + '/mods-available',
  1799. 'fpm': 'php' + phpng_version + '-fpm',
  1800. 'gd': 'php' + phpng_version + '-gd',
  1801. 'gearman': 'php-gearman',
  1802. 'geoip': 'php-geoip',
  1803. 'geshi': 'php-geshi',
  1804. 'gettext': 'php' + phpng_version,
  1805. 'gmp': 'php' + phpng_version + '-gmp',
  1806. 'hhvm': 'hhvm',
  1807. 'imagick': 'php-imagick',
  1808. 'imap': 'php' + phpng_version + '-imap',
  1809. 'intl': 'php' + phpng_version + '-intl',
  1810. 'json': 'php' + phpng_version + '-json',
  1811. 'ldap': 'php' + phpng_version + '-ldap',
  1812. 'local_bin': '/usr/local/bin',
  1813. 'mbstring': 'php' + phpng_version + '-mbstring',
  1814. 'mcrypt': 'php' + phpng_version + '-mcrypt',
  1815. 'memcache': 'php-memcache',
  1816. 'memcached': 'php-memcached',
  1817. 'mongo': 'php-mongo',
  1818. 'mongodb': 'php-mongodb',
  1819. 'mysql': 'php' + phpng_version + '-mysql',
  1820. 'mysqlnd': 'php' + phpng_version + '-mysql',
  1821. 'net4': 'php-net-ipv4',
  1822. 'net6': 'php-net-ipv6',
  1823. 'oauth': 'php-oauth',
  1824. 'opcache': 'php' + phpng_version + '-opcache',
  1825. 'pear': 'php-pear',
  1826. 'pgsql': 'php' + phpng_version + '-pgsql',
  1827. 'php': 'php' + phpng_version,
  1828. 'phpenmod_command': 'phpenmod -v' + phpng_version,
  1829. 'pspell': 'php' + phpng_version + '-pspell',
  1830. 'redis': 'php-redis',
  1831. 'seclib': ['php-phpseclib', 'php-seclib'],
  1832. 'snmp': 'php' + phpng_version + '-snmp',
  1833. 'soap': 'php' + phpng_version + '-soap',
  1834. 'ssh2': 'php-ssh2',
  1835. 'sqlite': 'php' + phpng_version + '-sqlite3',
  1836. 'suhosin5_ext': 'suhosin.so',
  1837. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  1838. 'suhosin7_ext': 'suhosin7.so',
  1839. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  1840. 'sybase': 'php' + phpng_version + '-sybase',
  1841. 'tcpdf': 'php-tcpdf',
  1842. 'temp_dir': '/tmp',
  1843. 'tidy': 'php' + phpng_version + '-tidy',
  1844. 'xdebug': 'php' + phpng_version + '-xdebug',
  1845. 'xml': 'php' + phpng_version + '-xml',
  1846. 'xsl': 'php' + phpng_version + '-xsl',
  1847. 'zip': 'php' + phpng_version + '-zip',
  1848. },
  1849. 'fpm': {
  1850. 'conf': confdir + '/fpm/php-fpm.conf',
  1851. 'ini': confdir + '/fpm/php.ini',
  1852. 'pools': confdir + '/fpm/pool.d',
  1853. 'service': 'php' + phpng_version + '-fpm',
  1854. 'defaults': odict([
  1855. ('global', odict([
  1856. ('pid', '/var/run/php' + phpng_version + '-fpm.pid'),
  1857. ('error_log', '/var/log/php' + phpng_version + '-fpm.log'),
  1858. ])),
  1859. ('include', confdir + '/fpm/pool.d/*.conf'),
  1860. ]),
  1861. },
  1862. 'hhvm': {
  1863. 'conf': '/etc/hhvm/server.ini',
  1864. 'ini': '/etc/hhvm/php.ini',
  1865. 'service': 'hhvm',
  1866. 'defaults': {},
  1867. 'server': odict([
  1868. ('pid', '/var/run/hhvm/pid'),
  1869. ('hhvm.server.port', '9000'),
  1870. ('hhvm.server.type', 'fastcgi'),
  1871. ('hhvm.server.default_document', 'index.php'),
  1872. ('hhvm.log.use_log_file', 'true'),
  1873. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  1874. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  1875. ]),
  1876. 'php': odict([
  1877. ('session.save_handler', 'files'),
  1878. ('session.save_path', '/var/lib/hhvm/sessions'),
  1879. ('session.gc_maxlifetime', '1440'),
  1880. ('hhvm.log.level', 'Warning'),
  1881. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  1882. ('hhvm.log.runtime_error_reporting_level', '8191'),
  1883. ('hhvm.mysql.typed_results', 'false'),
  1884. ]),
  1885. },
  1886. 'cli': {
  1887. 'ini': confdir + '/cli/php.ini',
  1888. },
  1889. 'apache2': {
  1890. 'ini': confdir + '/apache2/php.ini',
  1891. },
  1892. },
  1893. }),
  1894. 'fpm': {
  1895. 'service': {
  1896. 'enabled': True,
  1897. 'opts': {},
  1898. },
  1899. 'config': {
  1900. 'ini': {
  1901. 'opts': {},
  1902. 'settings': {},
  1903. },
  1904. 'conf': {
  1905. 'opts': {},
  1906. 'settings': {},
  1907. },
  1908. },
  1909. 'pools': {},
  1910. },
  1911. 'hhvm': {
  1912. 'service': {
  1913. 'enabled': True,
  1914. 'opts': {},
  1915. },
  1916. 'config': {
  1917. 'server': {
  1918. 'opts': {},
  1919. 'settings': {},
  1920. },
  1921. 'php': {
  1922. 'opts': {},
  1923. 'settings': {},
  1924. },
  1925. },
  1926. },
  1927. 'cli': {
  1928. 'ini': {
  1929. 'opts': {},
  1930. 'settings': {},
  1931. }
  1932. },
  1933. 'apache2': {
  1934. 'ini': {
  1935. 'opts': {},
  1936. 'settings': {},
  1937. }
  1938. },
  1939. 'ini': {
  1940. 'defaults': {
  1941. 'PHP': {
  1942. 'allow_url_fopen': 'On',
  1943. 'allow_url_include': 'Off',
  1944. 'asp_tags': 'Off',
  1945. 'auto_globals_jit': 'On',
  1946. 'default_mimetype': '"text/html"',
  1947. 'default_socket_timeout': 60,
  1948. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  1949. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  1950. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  1951. 'display_errors': 'Off',
  1952. 'display_startup_errors': 'Off',
  1953. 'enable_dl': 'Off',
  1954. 'engine': 'On',
  1955. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  1956. 'expose_php': 'On',
  1957. 'file_uploads': 'On',
  1958. 'html_errors': 'On',
  1959. 'ignore_repeated_errors': 'Off',
  1960. 'ignore_repeated_source': 'Off',
  1961. 'implicit_flush': 'Off',
  1962. 'log_errors': 'On',
  1963. 'log_errors_max_len': 1024,
  1964. 'max_execution_time': 30,
  1965. 'max_file_uploads': 20,
  1966. 'max_input_nesting_level': 64,
  1967. 'max_input_time': 60,
  1968. 'max_input_vars': 1000,
  1969. 'memory_limit': '128M',
  1970. 'output_buffering': 4096,
  1971. 'post_max_size': '8M',
  1972. 'precision': 14,
  1973. 'register_argc_argv': 'Off',
  1974. 'report_memleaks': 'On',
  1975. 'request_order': 'GP',
  1976. 'serialize_precision': 17,
  1977. 'short_open_tag': 'Off',
  1978. 'track_errors': 'Off',
  1979. 'upload_max_filesize': '2M',
  1980. 'variables_order': 'GPCS',
  1981. 'zend.enable_gc': 'On',
  1982. 'zlib.output_compression': 'Off',
  1983. },
  1984. 'CLI Server': {
  1985. 'cli_server.color': 'On'
  1986. },
  1987. 'Date': {
  1988. 'date.timezone': 'America/New_York'
  1989. },
  1990. 'Pdo_mysql': {
  1991. 'pdo_mysql.cache_size': 2000
  1992. },
  1993. 'mail function': {
  1994. 'SMTP': 'localhost',
  1995. 'mail.add_x_header': 'On'
  1996. },
  1997. 'SQL': {
  1998. 'sql.safe_mode': 'Off'
  1999. },
  2000. 'ODBC': {
  2001. 'odbc.allow_persistent': 'On',
  2002. 'odbc.check_persistent': 'On',
  2003. 'odbc.max_persistent': '-1',
  2004. 'odbc.max_links': '-1',
  2005. 'odbc.defaultlrl': 4096,
  2006. 'odbc.defaultbinmode': 1
  2007. },
  2008. 'Interbase': {
  2009. 'ibase.allow_persistent': 1,
  2010. 'ibase.max_persistent': -1,
  2011. 'ibase.max_links': -1,
  2012. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  2013. 'ibase.dateformat': '"%Y-%m-%d"',
  2014. 'ibase.timeformat': '"%H:%M:%S"'
  2015. },
  2016. 'MySQL': {
  2017. 'mysql.allow_local_infile': 'On',
  2018. 'mysql.allow_persistent': 'On',
  2019. 'mysql.cache_size': '2000',
  2020. 'mysql.max_persistent': -1,
  2021. 'mysql.max_links': -1,
  2022. 'mysql.connect_timeout': 60,
  2023. 'mysql.trace_mode': 'Off'
  2024. },
  2025. 'MySQLi': {
  2026. 'mysqli.max_persistent': -1,
  2027. 'mysqli.allow_persistent': 'On',
  2028. 'mysqli.max_links': -1,
  2029. 'mysqli.cache_size': 2000,
  2030. 'mysqli.default_port': 3306,
  2031. 'mysqli.reconnect': 'Off'
  2032. },
  2033. 'mysqlnd': {
  2034. 'mysqlnd.collect_statistics': 'On',
  2035. 'mysqlnd.collect_memory_statistics': 'Off'
  2036. },
  2037. 'PostgreSQL': {
  2038. 'pgsql.allow_persistent': 'On',
  2039. 'pgsql.auto_reset_persistent': 'Off',
  2040. 'pgsql.max_persistent': -1,
  2041. 'pgsql.max_links': -1,
  2042. 'pgsql.ignore_notice': 0,
  2043. 'pgsql.log_notice': 0
  2044. },
  2045. 'Sybase-CT': {
  2046. 'sybct.allow_persistent': 'On',
  2047. 'sybct.max_persistent': -1,
  2048. 'sybct.max_links': -1,
  2049. 'sybct.min_server_severity': 10,
  2050. 'sybct.min_client_severity': 10
  2051. },
  2052. 'bcmath': {
  2053. 'bcmath.scale': 0
  2054. },
  2055. 'Session': {
  2056. 'session.save_handler': 'files',
  2057. 'session.use_strict_mode': 0,
  2058. 'session.use_cookies': 1,
  2059. 'session.use_only_cookies': 1,
  2060. 'session.name': 'PHPSESSID',
  2061. 'session.auto_start': 0,
  2062. 'session.cookie_lifetime': 0,
  2063. 'session.cookie_path': '/',
  2064. 'session.serialize_handler': 'php',
  2065. 'session.gc_probability': 0,
  2066. 'session.gc_divisor': 1000,
  2067. 'session.gc_maxlifetime': 1440,
  2068. 'session.bug_compat_42': 'Off',
  2069. 'session.bug_compat_warn': 'Off',
  2070. 'session.cache_limiter': 'nocache',
  2071. 'session.cache_expire': '180',
  2072. 'session.use_trans_sid': 0,
  2073. 'session.hash_function': 0,
  2074. 'session.hash_bits_per_character': 5,
  2075. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  2076. },
  2077. 'MSSQL': {
  2078. 'mssql.allow_persistent': 'On',
  2079. 'mssql.max_persistent': -1,
  2080. 'mssql.max_links': -1,
  2081. 'mssql.min_error_severity': 10,
  2082. 'mssql.min_message_severity': 10,
  2083. 'mssql.compatibility_mode': 'Off',
  2084. 'mssql.secure_connection': 'Off'
  2085. },
  2086. 'Tidy': {
  2087. 'tidy.clean_output': 'Off'
  2088. },
  2089. 'soap': {
  2090. 'soap.wsdl_cache_enabled': 1,
  2091. 'soap.wsdl_cache_dir': '"/tmp"',
  2092. 'soap.wsdl_cache_ttl': 86400,
  2093. 'soap.wsdl_cache_limit': 5
  2094. },
  2095. 'ldap': {
  2096. 'ldap.max_links': -1
  2097. },
  2098. },
  2099. },
  2100. }, merge=True) %}
  2101. {%- else %}
  2102. {%- set php = salt['pillar.get']('php:ng', {
  2103. 'lookup': salt['grains.filter_by']({
  2104. 'Debian': {
  2105. 'pkgs': {
  2106. 'adodb': 'php5-adodb',
  2107. 'apache2': 'libapache2-mod-php5',
  2108. 'apc': 'php-apc',
  2109. 'apcu': 'php5-apcu',
  2110. 'bcmath': 'php5',
  2111. 'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev'],
  2112. 'cache-lite': 'php-cache-lite',
  2113. 'cgi': 'php5-cgi',
  2114. 'cli': 'php5-cli',
  2115. 'console-table': 'php-console-table',
  2116. 'composer_bin': 'composer',
  2117. 'curl': 'php5-curl',
  2118. 'dev': ['php5-dev','build-essential'],
  2119. 'ext_conf_path': '/etc/php5/mods-available',
  2120. 'fpm': 'php5-fpm',
  2121. 'gd': 'php5-gd',
  2122. 'gearman': 'php5-gearman',
  2123. 'geoip': 'php5-geoip',
  2124. 'geshi': 'php-geshi',
  2125. 'gettext': 'php-gettext',
  2126. 'gmp': 'php5-gmp',
  2127. 'hhvm': 'hhvm',
  2128. 'imagick': 'php5-imagick',
  2129. 'imap': 'php5-imap',
  2130. 'intl': 'php5-intl',
  2131. 'json': 'php5-json',
  2132. 'ldap': 'php5-ldap',
  2133. 'local_bin': '/usr/local/bin',
  2134. 'mbstring': 'php5',
  2135. 'mcrypt': 'php5-mcrypt',
  2136. 'mdb2': 'php-mdb2',
  2137. 'mdb2-driver-mysql': 'php-mdb2-driver-mysql',
  2138. 'mdb2-driver-pgsql': 'php-mdb2-driver-pgsql',
  2139. 'memcache': 'php5-memcache',
  2140. 'memcached': 'php5-memcached',
  2141. 'mysql': 'php5-mysql',
  2142. 'mysqlnd': 'php5-mysqlnd',
  2143. 'net4': 'php-net-ipv4',
  2144. 'net6': 'php-net-ipv6',
  2145. 'oauth': 'php5-oauth',
  2146. 'opcache': 'php5',
  2147. 'pear': 'php-pear',
  2148. 'pgsql': 'php5-pgsql',
  2149. 'php': 'php5',
  2150. 'phpenmod_command': 'php5enmod',
  2151. 'pspell': 'php5-pspell',
  2152. 'redis': 'php5-redis',
  2153. 'seclib': 'php-seclib',
  2154. 'snmp': 'php5-snmp',
  2155. 'soap': 'php-soap',
  2156. 'sqlite': 'php5-sqlite',
  2157. 'ssh2': 'php5-ssh2',
  2158. 'suhosin5_ext': 'suhosin.so',
  2159. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  2160. 'suhosin7_ext': 'suhosin7.so',
  2161. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  2162. 'svn': 'php5-svn',
  2163. 'sybase': 'php5-sybase',
  2164. 'tcpdf': 'php-tcpdf',
  2165. 'temp_dir': '/tmp',
  2166. 'tidy': 'php5-tidy',
  2167. 'uuid': 'php-uuid',
  2168. 'xcache': 'php5-xcache',
  2169. 'xdebug': 'php5-xdebug',
  2170. 'xml': 'php5',
  2171. 'xsl': 'php5-xsl',
  2172. 'zip': 'php5',
  2173. },
  2174. 'fpm': {
  2175. 'conf': '/etc/php5/fpm/php-fpm.conf',
  2176. 'ini': '/etc/php5/fpm/php.ini',
  2177. 'pools': '/etc/php5/fpm/pool.d',
  2178. 'service': 'php5-fpm',
  2179. 'defaults': odict([
  2180. ('global', odict([
  2181. ('pid', '/var/run/php5-fpm.pid'),
  2182. ('error_log', '/var/log/php5-fpm.log'),
  2183. ])),
  2184. ('include', '/etc/php5/fpm/pool.d/*.conf'),
  2185. ]),
  2186. },
  2187. 'hhvm': {
  2188. 'conf': '/etc/hhvm/server.ini',
  2189. 'ini': '/etc/hhvm/php.ini',
  2190. 'service': 'hhvm',
  2191. 'defaults': {},
  2192. 'server': odict([
  2193. ('pid', '/var/run/hhvm/pid'),
  2194. ('hhvm.server.port', '9000'),
  2195. ('hhvm.server.type', 'fastcgi'),
  2196. ('hhvm.server.default_document', 'index.php'),
  2197. ('hhvm.log.use_log_file', 'true'),
  2198. ('hhvm.log.file', '/var/log/hhvm/error.log'),
  2199. ('hhvm.repo.central.path', '/var/run/hhvm/hhvm.hhbc'),
  2200. ]),
  2201. 'php': odict([
  2202. ('session.save_handler', 'files'),
  2203. ('session.save_path', '/var/lib/hhvm/sessions'),
  2204. ('session.gc_maxlifetime', '1440'),
  2205. ('hhvm.log.level', 'Warning'),
  2206. ('hhvm.log.always_log_unhandled_exceptions', 'true'),
  2207. ('hhvm.log.runtime_error_reporting_level', '8191'),
  2208. ('hhvm.mysql.typed_results', 'false'),
  2209. ]),
  2210. },
  2211. 'cli': {
  2212. 'ini': '/etc/php5/cli/php.ini',
  2213. },
  2214. 'apache2': {
  2215. 'ini': '/etc/php5/apache2/php.ini',
  2216. },
  2217. 'xcache': {
  2218. 'ini': '/etc/php5/mods-available/xcache.ini',
  2219. 'defaults': {},
  2220. },
  2221. },
  2222. 'RedHat': {
  2223. 'pkgs': {
  2224. 'adodb': 'php-adodb',
  2225. 'apc': 'php-pecl-apc',
  2226. 'apcu': 'php-pecl-apcu',
  2227. 'bcmath': 'php-bcmath',
  2228. 'build_pkgs': ['openssl-devel', 'gcc'],
  2229. 'cache-lite': 'php-pear-Cache-Lite',
  2230. 'cgi': 'php-cgi',
  2231. 'cli': 'php-cli',
  2232. 'composer': 'composer',
  2233. 'composer_bin': 'composer',
  2234. 'console-table': 'php-pear-Console-Table',
  2235. 'curl': ['php-common', 'curl'],
  2236. 'dev': 'php-devel',
  2237. 'ext_conf_path': '/etc/php.d',
  2238. 'fpm': 'php-fpm',
  2239. 'gd': 'php-gd',
  2240. 'geoip': 'php-pecl-geoip',
  2241. 'geshi': 'php-geshi',
  2242. 'gettext': 'php-php-gettext',
  2243. 'http': 'php-pecl-http',
  2244. 'imagick': 'php-pecl-imagick',
  2245. 'imap': 'php-imap',
  2246. 'intl': 'php-intl',
  2247. 'json': 'php-common',
  2248. 'ldap': 'php-ldap',
  2249. 'local_bin': '/usr/local/bin',
  2250. 'mbstring': 'php-mbstring',
  2251. 'mcrypt': 'php-mcrypt',
  2252. 'memcache': 'php-pecl-memcache',
  2253. 'memcached': 'php-pecl-memcached',
  2254. 'mysql': 'php-mysql',
  2255. 'mysqlnd': 'php-mysqlnd',
  2256. 'net4': 'php-pear-Net-IPv4',
  2257. 'oauth': 'php-pecl-oauth',
  2258. 'opcache': 'php-pecl-zendopcache',
  2259. 'pear': 'php-pear',
  2260. 'pgsql': 'php-pgsql',
  2261. 'php': 'php',
  2262. 'pspell': 'php-pspell',
  2263. 'redis': 'php-pecl-redis',
  2264. 'seclib': 'php-phpseclib',
  2265. 'snmp': 'php-snmp',
  2266. 'soap': 'php-soap',
  2267. 'sqlite': 'php-pdo',
  2268. 'ssh2': 'php-pecl-ssh2',
  2269. 'suhosin5_ext': 'suhosin.so',
  2270. 'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
  2271. 'suhosin7_ext': 'suhosin7.so',
  2272. 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
  2273. 'tcpdf': 'php-tcpdf',
  2274. 'temp_dir': '/tmp',
  2275. 'tidy': 'php-tidy',
  2276. 'uuid': 'php-pecl-uuid',
  2277. 'xcache': 'php-xcache',
  2278. 'xdebug': 'php-pecl-xdebug',
  2279. 'xml': 'php-xml',
  2280. 'xsl': 'php-xml',
  2281. 'zip': 'php',
  2282. },
  2283. 'fpm': {
  2284. 'conf': '/etc/php-fpm.conf',
  2285. 'ini': '/etc/php.ini',
  2286. 'pools': '/etc/php-fpm.d',
  2287. 'service': 'php-fpm',
  2288. 'defaults': {
  2289. 'global': {
  2290. 'pid': '/var/run/php-fpm/php-fpm.pid',
  2291. 'error_log': '/var/log/php-fpm/error.log',
  2292. },
  2293. 'include': '/etc/php-fpm.d/*.conf',
  2294. },
  2295. },
  2296. 'cli': {
  2297. 'ini': '/etc/php.ini',
  2298. },
  2299. 'xcache': {
  2300. 'ini': '/etc/php.d/xcache.ini',
  2301. },
  2302. },
  2303. 'Suse': {
  2304. 'pkgs': {
  2305. 'adodb': 'php5-dba',
  2306. 'apache2': 'apache2-mod_php5',
  2307. 'cli': 'php5',
  2308. 'curl': 'php5-curl',
  2309. 'fpm': 'php5-fpm',
  2310. 'gd': 'php5-gd',
  2311. 'imap': 'php5-imap',
  2312. 'intl': 'php5-intl',
  2313. 'json': 'php5-json',
  2314. 'ldap': 'php5-ldap',
  2315. 'mbstring': 'php5-mbstring',
  2316. 'mcrypt': 'php5-mcrypt',
  2317. 'mysql': 'php5-mysql',
  2318. 'oauth': 'php5-oauth',
  2319. 'pear': 'php5-pear',
  2320. 'pgsql': 'php5-pgsql',
  2321. 'php': 'php5',
  2322. 'snmp': 'php5-snmp',
  2323. 'soap': 'php5-soap',
  2324. 'sqlite': 'php5-sqlite',
  2325. 'suhosin': 'php5-suhosin',
  2326. 'xml': ['php5-xmlreader','php5-xmlwriter','php5-xmlrpc'],
  2327. 'zip': 'php5-zip',
  2328. },
  2329. 'fpm': {
  2330. 'conf': '/etc/php-fpm.conf',
  2331. 'ini': '/etc/php.ini',
  2332. 'pools': '/etc/php-fpm.d',
  2333. 'service': 'php-fpm',
  2334. 'defaults': {
  2335. 'global': {
  2336. 'pid': '/var/run/php-fpm/php-fpm.pid',
  2337. 'error_log': '/var/log/php-fpm/error.log',
  2338. },
  2339. 'include': '/etc/php-fpm.d/*.conf',
  2340. },
  2341. },
  2342. 'cli': {
  2343. 'ini': '/etc/php.ini',
  2344. },
  2345. },
  2346. 'Arch': {
  2347. 'pkgs': {
  2348. 'apc': 'php-apcu',
  2349. 'apcu': 'php-apcu-bc',
  2350. 'cgi': 'php-cgi',
  2351. 'cli': 'php',
  2352. 'composer_bin': 'composer',
  2353. 'curl': 'curl',
  2354. 'fpm': 'php-fpm',
  2355. 'gd': 'php-gd',
  2356. 'geoip': 'php-geoip',
  2357. 'imap': 'php-imap',
  2358. 'intl': 'php-intl',
  2359. 'local_bin': '/usr/local/bin',
  2360. 'mcrypt': 'php-mcrypt',
  2361. 'memcache': 'php-memcache',
  2362. 'memcached': 'php-memcached',
  2363. 'pgsql': 'php-pgsql',
  2364. 'php': 'php',
  2365. 'pspell': 'php-pspell',
  2366. 'snmp': 'php-snmp',
  2367. 'sqlite': 'php-sqlite',
  2368. 'temp_dir': '/tmp',
  2369. 'tidy': 'php-tidy',
  2370. 'xcache': 'php-xcache',
  2371. 'xdebug': 'xdebug',
  2372. 'xsl': 'php-xsl',
  2373. },
  2374. 'fpm': {
  2375. 'conf': '/etc/php/php-fpm.conf',
  2376. 'ini': '/etc/php/php.ini',
  2377. 'pools': '/etc/php/fpm.d',
  2378. 'service': 'php-fpm',
  2379. 'defaults': {
  2380. 'global': {
  2381. 'pid': '/run/php-fpm/php-fpm.pid',
  2382. 'error_log': 'log/php-fpm.log',
  2383. },
  2384. 'include': '/etc/php/fpm.d/*.conf',
  2385. },
  2386. },
  2387. 'cli': {
  2388. 'ini': '/etc/php/php-cli.ini',
  2389. },
  2390. 'xcache': {
  2391. 'ini': '/etc/php/conf.d/xcache.ini',
  2392. },
  2393. },
  2394. 'FreeBSD': {
  2395. 'apache2': {
  2396. 'ini': '/usr/local/etc/php.ini',
  2397. 'module_config': '/usr/local/etc/apache24/modules.d/050_mod_php.conf',
  2398. 'name': 'apache24',
  2399. },
  2400. 'cli': {
  2401. 'ini': '/usr/local/etc/php.ini'
  2402. },
  2403. 'pkgs': {
  2404. 'apache2': 'mod_php' + freebsd_phpng_version,
  2405. 'composer_bin': 'composer',
  2406. 'filter': 'php' + freebsd_phpng_version + '-filter',
  2407. 'hash': 'php' + freebsd_phpng_version + '-hash',
  2408. 'json': 'php' + freebsd_phpng_version + '-json',
  2409. 'local_bin': '/usr/local/bin',
  2410. 'mbstring': 'php' + freebsd_phpng_version + '-mbstring',
  2411. 'openssl': 'php' + freebsd_phpng_version + '-openssl',
  2412. 'php': 'php' + freebsd_phpng_version,
  2413. 'phar': 'php' + freebsd_phpng_version + '-phar',
  2414. 'temp_dir': '/tmp',
  2415. },
  2416. },
  2417. }),
  2418. 'fpm': {
  2419. 'service': {
  2420. 'enabled': True,
  2421. 'opts': {},
  2422. },
  2423. 'config': {
  2424. 'ini': {
  2425. 'opts': {},
  2426. 'settings': {},
  2427. },
  2428. 'conf': {
  2429. 'opts': {},
  2430. 'settings': {},
  2431. },
  2432. },
  2433. 'pools': {
  2434. 'default.conf': {
  2435. 'enabled': False,
  2436. 'opts': {},
  2437. },
  2438. },
  2439. },
  2440. 'hhvm': {
  2441. 'service': {
  2442. 'enabled': True,
  2443. 'opts': {},
  2444. },
  2445. 'config': {
  2446. 'server': {
  2447. 'opts': {},
  2448. 'settings': {},
  2449. },
  2450. 'php': {
  2451. 'opts': {},
  2452. 'settings': {},
  2453. },
  2454. },
  2455. },
  2456. 'cli': {
  2457. 'ini': {
  2458. 'opts': {},
  2459. 'settings': {},
  2460. }
  2461. },
  2462. 'apache2': {
  2463. 'ini': {
  2464. 'opts': {},
  2465. 'settings': {},
  2466. }
  2467. },
  2468. 'xcache': {
  2469. 'ini': {
  2470. 'defaults': {
  2471. 'xcache-common': {
  2472. 'extension': 'xcache.so',
  2473. },
  2474. 'xcache.admin': {
  2475. 'xcache.admin.enable_auth': 'On',
  2476. },
  2477. 'xcache': {
  2478. 'xcache.shm_scheme': '"mmap"',
  2479. 'xcache.size': '60M',
  2480. 'xcache.count': '1',
  2481. 'xcache.slots': '8K',
  2482. 'xcache.ttl': '0',
  2483. 'xcache.gc_interval': '0',
  2484. 'xcache.var_size': '4M',
  2485. 'xcache.var_count': '1',
  2486. 'xcache.var_slots': '8K',
  2487. 'xcache.var_ttl': '0',
  2488. 'xcache.var_maxttl': '0',
  2489. 'xcache.var_gc_interval': '300',
  2490. 'xcache.var_namespace_mode': '0',
  2491. 'xcache.var_namespace': '""',
  2492. 'xcache.readonly_protection': 'Off',
  2493. 'xcache.mmap_path': '"/dev/zero"',
  2494. 'xcache.coredump_directory': '""',
  2495. 'xcache.coredump_type': '0',
  2496. 'xcache.disable_on_crash': 'Off',
  2497. 'xcache.experimental': 'Off',
  2498. 'xcache.cacher': 'On',
  2499. 'xcache.stat': 'On',
  2500. 'xcache.optimizer': 'Off',
  2501. },
  2502. 'xcache.coverager': {
  2503. 'xcache.coverager': 'Off',
  2504. 'xcache.coverager_autostart': 'On',
  2505. 'xcache.coveragedump_directory': '""',
  2506. },
  2507. },
  2508. 'opts': {},
  2509. 'settings': {},
  2510. }
  2511. },
  2512. 'ini': {
  2513. 'defaults': {
  2514. 'PHP': {
  2515. 'engine': 'On',
  2516. 'allow_url_fopen': 'On',
  2517. 'allow_url_include': 'Off',
  2518. 'asp_tags': 'Off',
  2519. 'auto_globals_jit': 'On',
  2520. 'default_mimetype': '"text/html"',
  2521. 'default_socket_timeout': 60,
  2522. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  2523. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  2524. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  2525. 'display_errors': 'Off',
  2526. 'display_startup_errors': 'Off',
  2527. 'enable_dl': 'Off',
  2528. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  2529. 'expose_php': 'On',
  2530. 'file_uploads': 'On',
  2531. 'html_errors': 'On',
  2532. 'ignore_repeated_errors': 'Off',
  2533. 'ignore_repeated_source': 'Off',
  2534. 'implicit_flush': 'Off',
  2535. 'log_errors': 'On',
  2536. 'log_errors_max_len': 1024,
  2537. 'max_execution_time': 30,
  2538. 'max_file_uploads': 20,
  2539. 'max_input_nesting_level': 64,
  2540. 'max_input_time': 60,
  2541. 'max_input_vars': 1000,
  2542. 'memory_limit': '128M',
  2543. 'output_buffering': 4096,
  2544. 'post_max_size': '8M',
  2545. 'precision': 14,
  2546. 'register_argc_argv': 'Off',
  2547. 'report_memleaks': 'On',
  2548. 'request_order': 'GP',
  2549. 'serialize_precision': 17,
  2550. 'short_open_tag': 'Off',
  2551. 'track_errors': 'Off',
  2552. 'upload_max_filesize': '2M',
  2553. 'variables_order': 'GPCS',
  2554. 'zend.enable_gc': 'On',
  2555. 'zlib.output_compression': 'Off',
  2556. },
  2557. 'CLI Server': {
  2558. 'cli_server.color': 'On'
  2559. },
  2560. 'Date': {
  2561. 'date.timezone': 'America/New_York'
  2562. },
  2563. 'Pdo_mysql': {
  2564. 'pdo_mysql.cache_size': 2000
  2565. },
  2566. 'mail function': {
  2567. 'SMTP': 'localhost',
  2568. 'mail.add_x_header': 'On'
  2569. },
  2570. 'SQL': {
  2571. 'sql.safe_mode': 'Off'
  2572. },
  2573. 'ODBC': {
  2574. 'odbc.allow_persistent': 'On',
  2575. 'odbc.check_persistent': 'On',
  2576. 'odbc.max_persistent': '-1',
  2577. 'odbc.max_links': '-1',
  2578. 'odbc.defaultlrl': 4096,
  2579. 'odbc.defaultbinmode': 1
  2580. },
  2581. 'Interbase': {
  2582. 'ibase.allow_persistent': 1,
  2583. 'ibase.max_persistent': -1,
  2584. 'ibase.max_links': -1,
  2585. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  2586. 'ibase.dateformat': '"%Y-%m-%d"',
  2587. 'ibase.timeformat': '"%H:%M:%S"'
  2588. },
  2589. 'MySQL': {
  2590. 'mysql.allow_local_infile': 'On',
  2591. 'mysql.allow_persistent': 'On',
  2592. 'mysql.cache_size': '2000',
  2593. 'mysql.max_persistent': -1,
  2594. 'mysql.max_links': -1,
  2595. 'mysql.connect_timeout': 60,
  2596. 'mysql.trace_mode': 'Off'
  2597. },
  2598. 'MySQLi': {
  2599. 'mysqli.max_persistent': -1,
  2600. 'mysqli.allow_persistent': 'On',
  2601. 'mysqli.max_links': -1,
  2602. 'mysqli.cache_size': 2000,
  2603. 'mysqli.default_port': 3306,
  2604. 'mysqli.reconnect': 'Off'
  2605. },
  2606. 'mysqlnd': {
  2607. 'mysqlnd.collect_statistics': 'On',
  2608. 'mysqlnd.collect_memory_statistics': 'Off'
  2609. },
  2610. 'PostgreSQL': {
  2611. 'pgsql.allow_persistent': 'On',
  2612. 'pgsql.auto_reset_persistent': 'Off',
  2613. 'pgsql.max_persistent': -1,
  2614. 'pgsql.max_links': -1,
  2615. 'pgsql.ignore_notice': 0,
  2616. 'pgsql.log_notice': 0
  2617. },
  2618. 'Sybase-CT': {
  2619. 'sybct.allow_persistent': 'On',
  2620. 'sybct.max_persistent': -1,
  2621. 'sybct.max_links': -1,
  2622. 'sybct.min_server_severity': 10,
  2623. 'sybct.min_client_severity': 10
  2624. },
  2625. 'bcmath': {
  2626. 'bcmath.scale': 0
  2627. },
  2628. 'Session': {
  2629. 'session.save_handler': 'files',
  2630. 'session.use_strict_mode': 0,
  2631. 'session.use_cookies': 1,
  2632. 'session.use_only_cookies': 1,
  2633. 'session.name': 'PHPSESSID',
  2634. 'session.auto_start': 0,
  2635. 'session.cookie_lifetime': 0,
  2636. 'session.cookie_path': '/',
  2637. 'session.serialize_handler': 'php',
  2638. 'session.gc_probability': 0,
  2639. 'session.gc_divisor': 1000,
  2640. 'session.gc_maxlifetime': 1440,
  2641. 'session.bug_compat_42': 'Off',
  2642. 'session.bug_compat_warn': 'Off',
  2643. 'session.cache_limiter': 'nocache',
  2644. 'session.cache_expire': '180',
  2645. 'session.use_trans_sid': 0,
  2646. 'session.hash_function': 0,
  2647. 'session.hash_bits_per_character': 5,
  2648. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  2649. },
  2650. 'MSSQL': {
  2651. 'mssql.allow_persistent': 'On',
  2652. 'mssql.max_persistent': -1,
  2653. 'mssql.max_links': -1,
  2654. 'mssql.min_error_severity': 10,
  2655. 'mssql.min_message_severity': 10,
  2656. 'mssql.compatibility_mode': 'Off',
  2657. 'mssql.secure_connection': 'Off'
  2658. },
  2659. 'Tidy': {
  2660. 'tidy.clean_output': 'Off'
  2661. },
  2662. 'soap': {
  2663. 'soap.wsdl_cache_enabled': 1,
  2664. 'soap.wsdl_cache_dir': '"/tmp"',
  2665. 'soap.wsdl_cache_ttl': 86400,
  2666. 'soap.wsdl_cache_limit': 5
  2667. },
  2668. 'ldap': {
  2669. 'ldap.max_links': -1
  2670. },
  2671. },
  2672. },
  2673. }, merge=True) %}
  2674. {%- endif %}