Saltstack Official PHP Formula
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. {% set php = salt['pillar.get']('php:ng', {
  2. 'lookup': salt['grains.filter_by']({
  3. 'Debian': {
  4. 'pkgs': {
  5. 'php': 'php5',
  6. 'apc': 'php-apc',
  7. 'cgi': 'php5-cgi',
  8. 'cli': 'php5-cli',
  9. 'curl': 'php5-curl',
  10. 'fpm': 'php5-fpm',
  11. 'gd': 'php5-gd',
  12. 'mbstring': 'php5',
  13. 'mcrypt': 'php5-mcrypt',
  14. 'memcache': 'php5-memcache',
  15. 'memcached': 'php5-memcached',
  16. 'mysql': 'php5-mysql',
  17. 'mysqlnd': 'php5-mysqlnd',
  18. 'pear': ' php-pear',
  19. 'soap': ' php-soap',
  20. 'xml': ' php5-xml',
  21. 'imagick': 'php5-imagick',
  22. 'suhosin': 'php5-suhosin',
  23. 'imap': 'php5-imap',
  24. 'adodb': 'php5-adodb',
  25. 'pgsql': 'php5-pgsql',
  26. 'ldap': 'php5-ldap',
  27. 'json': 'php5-json',
  28. },
  29. 'fpm': {
  30. 'conf': '/etc/php5/fpm/php-fpm.conf',
  31. 'ini': '/etc/php5/fpm/php.ini',
  32. 'pools': '/etc/php5/fpm/pool.d',
  33. 'service': 'php5-fpm',
  34. 'defaults': odict([
  35. ('global', odict([
  36. ('pid', '/var/run/php5-fpm.pid'),
  37. ('error_log', '/var/log/php5-fpm.log'),
  38. ('include', '/etc/php5/fpm/pool.d/*.conf'),
  39. ])),
  40. ]),
  41. },
  42. 'cli': {
  43. 'ini': '/etc/php5/cli/php.ini',
  44. },
  45. },
  46. 'RedHat': {
  47. 'pkgs': {
  48. 'php': 'php',
  49. 'apc': 'php-pecl-apc',
  50. 'cgi': 'php-cgi',
  51. 'cli': 'php-cli',
  52. 'curl': ['php-common', 'curl'],
  53. 'fpm': 'php-fpm',
  54. 'gd': 'php-gd',
  55. 'mbstring': 'php-mbstring',
  56. 'mcrypt': 'php-mcrypt',
  57. 'memcache': 'php-pecl-memcache',
  58. 'memcached': 'php-pecl-memcached',
  59. 'mysql': 'php-mysql',
  60. 'mysqlnd': 'php-mysqlnd',
  61. 'pear': ' php-pear',
  62. 'soap': ' php-soap',
  63. 'xml': ' php-xml',
  64. 'imagick': 'php-imagick',
  65. 'suhosin': 'php-suhosin',
  66. 'imap': 'php-imap',
  67. 'adodb': 'php-adodb',
  68. 'pgsql': 'php-pgsql',
  69. 'ldap': 'php-ldap',
  70. 'json': 'php-common',
  71. },
  72. 'fpm': {
  73. 'conf': '/etc/php-fpm.conf',
  74. 'ini': '/etc/php.ini',
  75. 'pools': '/etc/php-fpm.d',
  76. 'service': 'php-fpm',
  77. 'defaults': {
  78. 'global': {
  79. 'pid': '/var/run/php-fpm/php-fpm.pid',
  80. 'error_log': '/var/log/php-fpm/error.log',
  81. 'include': '/etc/php-fpm.d/*.conf',
  82. },
  83. },
  84. },
  85. 'cli': {
  86. 'ini': '/etc/php.ini',
  87. },
  88. },
  89. }),
  90. 'fpm': {
  91. 'service': {
  92. 'enabled': True,
  93. 'opts': {},
  94. },
  95. 'config': {
  96. 'ini': {
  97. 'opts': {},
  98. 'settings': {},
  99. },
  100. 'conf': {
  101. 'opts': {},
  102. 'settings': {},
  103. },
  104. },
  105. 'pools': {
  106. 'managed_opts': {},
  107. 'absent_opts': {},
  108. 'managed': {},
  109. },
  110. },
  111. 'cli': {
  112. 'ini':
  113. 'opts': {},
  114. 'settings': {},
  115. },
  116. 'ini': {
  117. 'defaults': {
  118. 'PHP': {
  119. 'engine': 'On',
  120. 'short_open_tag': 'Off',
  121. 'asp_tags': 'Off',
  122. 'precision': 14,
  123. 'output_buffering': 4096,
  124. 'zlib.output_compression': 'Off',
  125. 'implicit_flush': 'Off',
  126. 'serialize_precision': 17,
  127. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  128. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  129. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  130. 'zend.enable_gc': 'On',
  131. 'expose_php': 'On',
  132. 'max_execution_time': 30,
  133. 'max_input_time': 60,
  134. 'max_input_nesting_level': 64,
  135. 'max_input_vars': 1000,
  136. 'memory_limit': '128M',
  137. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  138. 'display_errors': 'Off',
  139. 'display_startup_errors': 'Off',
  140. 'log_errors': 'On',
  141. 'log_errors_max_len': 1024,
  142. 'ignore_repeated_errors': 'Off',
  143. 'ignore_repeated_source': 'Off',
  144. 'report_memleaks': 'On',
  145. 'track_errors': 'Off',
  146. 'html_errors': 'On',
  147. 'variables_order': 'GPCS',
  148. 'request_order': 'GP',
  149. 'register_argc_argv': 'Off',
  150. 'auto_globals_jit': 'On',
  151. 'post_max_size': '8M',
  152. 'default_mimetype': '"text/html"',
  153. 'enable_dl': 'Off',
  154. 'file_uploads': 'On',
  155. 'upload_max_filesize': '2M',
  156. 'max_file_uploads': 20,
  157. 'allow_url_fopen': 'On',
  158. 'allow_url_include': 'Off',
  159. 'default_socket_timeout': 60
  160. },
  161. 'CLI Server': {
  162. 'cli_server.color': 'On'
  163. },
  164. 'Date': {
  165. 'date.timezone': 'America/New_York'
  166. },
  167. 'Pdo_mysql': {
  168. 'pdo_mysql.cache_size': 2000
  169. },
  170. 'mail function': {
  171. 'SMTP': 'localhost',
  172. 'mail.add_x_header': 'On'
  173. },
  174. 'SQL': {
  175. 'sql.safe_mode': 'Off'
  176. },
  177. 'ODBC': {
  178. 'odbc.allow_persistent': 'On',
  179. 'odbc.check_persistent': 'On',
  180. 'odbc.max_persistent': '-1',
  181. 'odbc.max_links': '-1',
  182. 'odbc.defaultlrl': 4096,
  183. 'odbc.defaultbinmode': 1
  184. },
  185. 'Interbase': {
  186. 'ibase.allow_persistent': 1,
  187. 'ibase.max_persistent': -1,
  188. 'ibase.max_links': -1,
  189. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  190. 'ibase.dateformat': '"%Y-%m-%d"',
  191. 'ibase.timeformat': '"%H:%M:%S"'
  192. },
  193. 'MySQL': {
  194. 'mysql.allow_local_infile': 'On',
  195. 'mysql.allow_persistent': 'On',
  196. 'mysql.cache_size': '2000',
  197. 'mysql.max_persistent': -1,
  198. 'mysql.max_links': -1,
  199. 'mysql.connect_timeout': 60,
  200. 'mysql.trace_mode': 'Off'
  201. },
  202. 'MySQLi': {
  203. 'mysqli.max_persistent': -1,
  204. 'mysqli.allow_persistent': 'On',
  205. 'mysqli.max_links': -1,
  206. 'mysqli.cache_size': 2000,
  207. 'mysqli.default_port': 3306,
  208. 'mysqli.reconnect': 'Off'
  209. },
  210. 'mysqlnd': {
  211. 'mysqlnd.collect_statistics': 'On',
  212. 'mysqlnd.collect_memory_statistics': 'Off'
  213. },
  214. 'PostgreSQL': {
  215. 'pgsql.allow_persistent': 'On',
  216. 'pgsql.auto_reset_persistent': 'Off',
  217. 'pgsql.max_persistent': -1,
  218. 'pgsql.max_links': -1,
  219. 'pgsql.ignore_notice': 0,
  220. 'pgsql.log_notice': 0
  221. },
  222. 'Sybase-CT': {
  223. 'sybct.allow_persistent': 'On',
  224. 'sybct.max_persistent': -1,
  225. 'sybct.max_links': -1,
  226. 'sybct.min_server_severity': 10,
  227. 'sybct.min_client_severity': 10
  228. },
  229. 'bcmath': {
  230. 'bcmath.scale': 0
  231. },
  232. 'Session': {
  233. 'session.save_handler': 'files',
  234. 'session.use_strict_mode': 0,
  235. 'session.use_cookies': 1,
  236. 'session.use_only_cookies': 1,
  237. 'session.name': 'PHPSESSID',
  238. 'session.auto_start': 0,
  239. 'session.cookie_lifetime': 0,
  240. 'session.cookie_path': '/',
  241. 'session.serialize_handler': 'php',
  242. 'session.gc_probability': 0,
  243. 'session.gc_divisor': 1000,
  244. 'session.gc_maxlifetime': 1440,
  245. 'session.bug_compat_42': 'Off',
  246. 'session.bug_compat_warn': 'Off',
  247. 'session.cache_limiter': 'nocache',
  248. 'session.cache_expire': '180',
  249. 'session.use_trans_sid': 0,
  250. 'session.hash_function': 0,
  251. 'session.hash_bits_per_character': 5,
  252. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  253. },
  254. 'MSSQL': {
  255. 'mssql.allow_persistent': 'On',
  256. 'mssql.max_persistent': -1,
  257. 'mssql.max_links': -1,
  258. 'mssql.min_error_severity': 10,
  259. 'mssql.min_message_severity': 10,
  260. 'mssql.compatibility_mode': 'Off',
  261. 'mssql.secure_connection': 'Off'
  262. },
  263. 'Tidy': {
  264. 'tidy.clean_output': 'Off'
  265. },
  266. 'soap': {
  267. 'soap.wsdl_cache_enabled': 1,
  268. 'soap.wsdl_cache_dir': '"/tmp"',
  269. 'soap.wsdl_cache_ttl': 86400,
  270. 'soap.wsdl_cache_limit': 5
  271. },
  272. 'ldap': {
  273. 'ldap.max_links': -1
  274. },
  275. },
  276. },
  277. }, merge=True) %}