]> TLD Linux GIT Repositories - packages/php.git/blob - fpm-conf-split.patch
- updated to 5.6.40
[packages/php.git] / fpm-conf-split.patch
1 diff -urNpa php-5.6.35.orig/sapi/fpm/php-fpm.conf.in php-5.6.35/sapi/fpm/php-fpm.conf.in
2 --- php-5.6.35.orig/sapi/fpm/php-fpm.conf.in    2018-03-28 21:28:58.000000000 +0000
3 +++ php-5.6.35/sapi/fpm/php-fpm.conf.in 2018-04-12 10:03:34.184687949 +0000
4 @@ -6,14 +6,6 @@
5  ; prefix (@prefix@). This prefix can be dynamically changed by using the
6  ; '-p' argument from the command line.
7  
8 -; Include one or more files. If glob(3) exists, it is used to include a bunch of
9 -; files from a glob(3) pattern. This directive can be used everywhere in the
10 -; file.
11 -; Relative path can also be used. They will be prefixed by:
12 -;  - the global prefix if it's been set (-p argument)
13 -;  - @prefix@ otherwise
14 -;include=etc/fpm.d/*.conf
15 -
16  ;;;;;;;;;;;;;;;;;;
17  ; Global Options ;
18  ;;;;;;;;;;;;;;;;;;
19 @@ -123,421 +115,3 @@
20  ; ports and different management options.  The name of the pool will be
21  ; used in logs and stats. There is no limitation on the number of pools which
22  ; FPM can handle. Your system will tell you anyway :)
23 -
24 -; Start a new pool named 'www'.
25 -; the variable $pool can we used in any directive and will be replaced by the
26 -; pool name ('www' here)
27 -[www]
28 -
29 -; Per pool prefix
30 -; It only applies on the following directives:
31 -; - 'access.log'
32 -; - 'slowlog'
33 -; - 'listen' (unixsocket)
34 -; - 'chroot'
35 -; - 'chdir'
36 -; - 'php_values'
37 -; - 'php_admin_values'
38 -; When not set, the global prefix (or @php_fpm_prefix@) applies instead.
39 -; Note: This directive can also be relative to the global prefix.
40 -; Default Value: none
41 -;prefix = /path/to/pools/$pool
42 -
43 -; Unix user/group of processes
44 -; Note: The user is mandatory. If the group is not set, the default user's group
45 -;       will be used.
46 -user = @php_fpm_user@
47 -group = @php_fpm_group@
48 -
49 -; The address on which to accept FastCGI requests.
50 -; Valid syntaxes are:
51 -;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
52 -;                            a specific port;
53 -;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
54 -;                            a specific port;
55 -;   'port'                 - to listen on a TCP socket to all IPv4 addresses on a
56 -;                            specific port;
57 -;   '[::]:port'            - to listen on a TCP socket to all addresses
58 -;                            (IPv6 and IPv4-mapped) on a specific port;
59 -;   '/path/to/unix/socket' - to listen on a unix socket.
60 -; Note: This value is mandatory.
61 -listen = 127.0.0.1:9000
62 -
63 -; Set listen(2) backlog.
64 -; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
65 -;listen.backlog = 65535
66 -
67 -; Set permissions for unix socket, if one is used. In Linux, read/write
68 -; permissions must be set in order to allow connections from a web server. Many
69 -; BSD-derived systems allow connections regardless of permissions. 
70 -; Default Values: user and group are set as the running user
71 -;                 mode is set to 0660
72 -;listen.owner = @php_fpm_user@
73 -;listen.group = @php_fpm_group@
74 -;listen.mode = 0660
75 -; When POSIX Access Control Lists are supported you can set them using
76 -; these options, value is a comma separated list of user/group names.
77 -; When set, listen.owner and listen.group are ignored
78 -;listen.acl_users =
79 -;listen.acl_groups =
80
81 -; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
82 -; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
83 -; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
84 -; must be separated by a comma. If this value is left blank, connections will be
85 -; accepted from any ip address.
86 -; Default Value: any
87 -;listen.allowed_clients = 127.0.0.1
88 -
89 -; Specify the nice(2) priority to apply to the pool processes (only if set)
90 -; The value can vary from -19 (highest priority) to 20 (lower priority)
91 -; Note: - It will only work if the FPM master process is launched as root
92 -;       - The pool processes will inherit the master process priority
93 -;         unless it specified otherwise
94 -; Default Value: no set
95 -; process.priority = -19
96 -
97 -; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
98 -; or group is differrent than the master process user. It allows to create process
99 -; core dump and ptrace the process for the pool user.
100 -; Default Value: no
101 -; process.dumpable = yes
102 -
103 -; Choose how the process manager will control the number of child processes.
104 -; Possible Values:
105 -;   static  - a fixed number (pm.max_children) of child processes;
106 -;   dynamic - the number of child processes are set dynamically based on the
107 -;             following directives. With this process management, there will be
108 -;             always at least 1 children.
109 -;             pm.max_children      - the maximum number of children that can
110 -;                                    be alive at the same time.
111 -;             pm.start_servers     - the number of children created on startup.
112 -;             pm.min_spare_servers - the minimum number of children in 'idle'
113 -;                                    state (waiting to process). If the number
114 -;                                    of 'idle' processes is less than this
115 -;                                    number then some children will be created.
116 -;             pm.max_spare_servers - the maximum number of children in 'idle'
117 -;                                    state (waiting to process). If the number
118 -;                                    of 'idle' processes is greater than this
119 -;                                    number then some children will be killed.
120 -;  ondemand - no children are created at startup. Children will be forked when
121 -;             new requests will connect. The following parameter are used:
122 -;             pm.max_children           - the maximum number of children that
123 -;                                         can be alive at the same time.
124 -;             pm.process_idle_timeout   - The number of seconds after which
125 -;                                         an idle process will be killed.
126 -; Note: This value is mandatory.
127 -pm = dynamic
128 -
129 -; The number of child processes to be created when pm is set to 'static' and the
130 -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
131 -; This value sets the limit on the number of simultaneous requests that will be
132 -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
133 -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
134 -; CGI. The below defaults are based on a server without much resources. Don't
135 -; forget to tweak pm.* to fit your needs.
136 -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
137 -; Note: This value is mandatory.
138 -pm.max_children = 5
139 -
140 -; The number of child processes created on startup.
141 -; Note: Used only when pm is set to 'dynamic'
142 -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
143 -pm.start_servers = 2
144 -
145 -; The desired minimum number of idle server processes.
146 -; Note: Used only when pm is set to 'dynamic'
147 -; Note: Mandatory when pm is set to 'dynamic'
148 -pm.min_spare_servers = 1
149 -
150 -; The desired maximum number of idle server processes.
151 -; Note: Used only when pm is set to 'dynamic'
152 -; Note: Mandatory when pm is set to 'dynamic'
153 -pm.max_spare_servers = 3
154 -
155 -; The number of seconds after which an idle process will be killed.
156 -; Note: Used only when pm is set to 'ondemand'
157 -; Default Value: 10s
158 -;pm.process_idle_timeout = 10s;
159
160 -; The number of requests each child process should execute before respawning.
161 -; This can be useful to work around memory leaks in 3rd party libraries. For
162 -; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
163 -; Default Value: 0
164 -;pm.max_requests = 500
165 -
166 -; The URI to view the FPM status page. If this value is not set, no URI will be
167 -; recognized as a status page. It shows the following informations:
168 -;   pool                 - the name of the pool;
169 -;   process manager      - static, dynamic or ondemand;
170 -;   start time           - the date and time FPM has started;
171 -;   start since          - number of seconds since FPM has started;
172 -;   accepted conn        - the number of request accepted by the pool;
173 -;   listen queue         - the number of request in the queue of pending
174 -;                          connections (see backlog in listen(2));
175 -;   max listen queue     - the maximum number of requests in the queue
176 -;                          of pending connections since FPM has started;
177 -;   listen queue len     - the size of the socket queue of pending connections;
178 -;   idle processes       - the number of idle processes;
179 -;   active processes     - the number of active processes;
180 -;   total processes      - the number of idle + active processes;
181 -;   max active processes - the maximum number of active processes since FPM
182 -;                          has started;
183 -;   max children reached - number of times, the process limit has been reached,
184 -;                          when pm tries to start more children (works only for
185 -;                          pm 'dynamic' and 'ondemand');
186 -; Value are updated in real time.
187 -; Example output:
188 -;   pool:                 www
189 -;   process manager:      static
190 -;   start time:           01/Jul/2011:17:53:49 +0200
191 -;   start since:          62636
192 -;   accepted conn:        190460
193 -;   listen queue:         0
194 -;   max listen queue:     1
195 -;   listen queue len:     42
196 -;   idle processes:       4
197 -;   active processes:     11
198 -;   total processes:      15
199 -;   max active processes: 12
200 -;   max children reached: 0
201 -;
202 -; By default the status page output is formatted as text/plain. Passing either
203 -; 'html', 'xml' or 'json' in the query string will return the corresponding
204 -; output syntax. Example:
205 -;   http://www.foo.bar/status
206 -;   http://www.foo.bar/status?json
207 -;   http://www.foo.bar/status?html
208 -;   http://www.foo.bar/status?xml
209 -;
210 -; By default the status page only outputs short status. Passing 'full' in the
211 -; query string will also return status for each pool process.
212 -; Example: 
213 -;   http://www.foo.bar/status?full
214 -;   http://www.foo.bar/status?json&full
215 -;   http://www.foo.bar/status?html&full
216 -;   http://www.foo.bar/status?xml&full
217 -; The Full status returns for each process:
218 -;   pid                  - the PID of the process;
219 -;   state                - the state of the process (Idle, Running, ...);
220 -;   start time           - the date and time the process has started;
221 -;   start since          - the number of seconds since the process has started;
222 -;   requests             - the number of requests the process has served;
223 -;   request duration     - the duration in Âµs of the requests;
224 -;   request method       - the request method (GET, POST, ...);
225 -;   request URI          - the request URI with the query string;
226 -;   content length       - the content length of the request (only with POST);
227 -;   user                 - the user (PHP_AUTH_USER) (or '-' if not set);
228 -;   script               - the main script called (or '-' if not set);
229 -;   last request cpu     - the %cpu the last request consumed
230 -;                          it's always 0 if the process is not in Idle state
231 -;                          because CPU calculation is done when the request
232 -;                          processing has terminated;
233 -;   last request memory  - the max amount of memory the last request consumed
234 -;                          it's always 0 if the process is not in Idle state
235 -;                          because memory calculation is done when the request
236 -;                          processing has terminated;
237 -; If the process is in Idle state, then informations are related to the
238 -; last request the process has served. Otherwise informations are related to
239 -; the current request being served.
240 -; Example output:
241 -;   ************************
242 -;   pid:                  31330
243 -;   state:                Running
244 -;   start time:           01/Jul/2011:17:53:49 +0200
245 -;   start since:          63087
246 -;   requests:             12808
247 -;   request duration:     1250261
248 -;   request method:       GET
249 -;   request URI:          /test_mem.php?N=10000
250 -;   content length:       0
251 -;   user:                 -
252 -;   script:               /home/fat/web/docs/php/test_mem.php
253 -;   last request cpu:     0.00
254 -;   last request memory:  0
255 -;
256 -; Note: There is a real-time FPM status monitoring sample web page available
257 -;       It's available in: @EXPANDED_DATADIR@/fpm/status.html
258 -;
259 -; Note: The value must start with a leading slash (/). The value can be
260 -;       anything, but it may not be a good idea to use the .php extension or it
261 -;       may conflict with a real PHP file.
262 -; Default Value: not set 
263 -;pm.status_path = /status
264
265 -; The ping URI to call the monitoring page of FPM. If this value is not set, no
266 -; URI will be recognized as a ping page. This could be used to test from outside
267 -; that FPM is alive and responding, or to
268 -; - create a graph of FPM availability (rrd or such);
269 -; - remove a server from a group if it is not responding (load balancing);
270 -; - trigger alerts for the operating team (24/7).
271 -; Note: The value must start with a leading slash (/). The value can be
272 -;       anything, but it may not be a good idea to use the .php extension or it
273 -;       may conflict with a real PHP file.
274 -; Default Value: not set
275 -;ping.path = /ping
276 -
277 -; This directive may be used to customize the response of a ping request. The
278 -; response is formatted as text/plain with a 200 response code.
279 -; Default Value: pong
280 -;ping.response = pong
281 -
282 -; The access log file
283 -; Default: not set
284 -;access.log = log/$pool.access.log
285 -
286 -; The access log format.
287 -; The following syntax is allowed
288 -;  %%: the '%' character
289 -;  %C: %CPU used by the request
290 -;      it can accept the following format:
291 -;      - %{user}C for user CPU only
292 -;      - %{system}C for system CPU only
293 -;      - %{total}C  for user + system CPU (default)
294 -;  %d: time taken to serve the request
295 -;      it can accept the following format:
296 -;      - %{seconds}d (default)
297 -;      - %{miliseconds}d
298 -;      - %{mili}d
299 -;      - %{microseconds}d
300 -;      - %{micro}d
301 -;  %e: an environment variable (same as $_ENV or $_SERVER)
302 -;      it must be associated with embraces to specify the name of the env
303 -;      variable. Some exemples:
304 -;      - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
305 -;      - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
306 -;  %f: script filename
307 -;  %l: content-length of the request (for POST request only)
308 -;  %m: request method
309 -;  %M: peak of memory allocated by PHP
310 -;      it can accept the following format:
311 -;      - %{bytes}M (default)
312 -;      - %{kilobytes}M
313 -;      - %{kilo}M
314 -;      - %{megabytes}M
315 -;      - %{mega}M
316 -;  %n: pool name
317 -;  %o: output header
318 -;      it must be associated with embraces to specify the name of the header:
319 -;      - %{Content-Type}o
320 -;      - %{X-Powered-By}o
321 -;      - %{Transfert-Encoding}o
322 -;      - ....
323 -;  %p: PID of the child that serviced the request
324 -;  %P: PID of the parent of the child that serviced the request
325 -;  %q: the query string 
326 -;  %Q: the '?' character if query string exists
327 -;  %r: the request URI (without the query string, see %q and %Q)
328 -;  %R: remote IP address
329 -;  %s: status (response code)
330 -;  %t: server time the request was received
331 -;      it can accept a strftime(3) format:
332 -;      %d/%b/%Y:%H:%M:%S %z (default)
333 -;  %T: time the log has been written (the request has finished)
334 -;      it can accept a strftime(3) format:
335 -;      %d/%b/%Y:%H:%M:%S %z (default)
336 -;  %u: remote user
337 -;
338 -; Default: "%R - %u %t \"%m %r\" %s"
339 -;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
340
341 -; The log file for slow requests
342 -; Default Value: not set
343 -; Note: slowlog is mandatory if request_slowlog_timeout is set
344 -;slowlog = log/$pool.log.slow
345
346 -; The timeout for serving a single request after which a PHP backtrace will be
347 -; dumped to the 'slowlog' file. A value of '0s' means 'off'.
348 -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
349 -; Default Value: 0
350 -;request_slowlog_timeout = 0
351
352 -; The timeout for serving a single request after which the worker process will
353 -; be killed. This option should be used when the 'max_execution_time' ini option
354 -; does not stop script execution for some reason. A value of '0' means 'off'.
355 -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
356 -; Default Value: 0
357 -;request_terminate_timeout = 0
358
359 -; Set open file descriptor rlimit.
360 -; Default Value: system defined value
361 -;rlimit_files = 1024
362
363 -; Set max core size rlimit.
364 -; Possible Values: 'unlimited' or an integer greater or equal to 0
365 -; Default Value: system defined value
366 -;rlimit_core = 0
367
368 -; Chroot to this directory at the start. This value must be defined as an
369 -; absolute path. When this value is not set, chroot is not used.
370 -; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
371 -; of its subdirectories. If the pool prefix is not set, the global prefix
372 -; will be used instead.
373 -; Note: chrooting is a great security feature and should be used whenever 
374 -;       possible. However, all PHP paths will be relative to the chroot
375 -;       (error_log, sessions.save_path, ...).
376 -; Default Value: not set
377 -;chroot = 
378
379 -; Chdir to this directory at the start.
380 -; Note: relative path can be used.
381 -; Default Value: current directory or / when chroot
382 -;chdir = /var/www
383
384 -; Redirect worker stdout and stderr into main error log. If not set, stdout and
385 -; stderr will be redirected to /dev/null according to FastCGI specs.
386 -; Note: on highloaded environement, this can cause some delay in the page
387 -; process time (several ms).
388 -; Default Value: no
389 -;catch_workers_output = yes
390 -
391 -; Clear environment in FPM workers
392 -; Prevents arbitrary environment variables from reaching FPM worker processes
393 -; by clearing the environment in workers before env vars specified in this
394 -; pool configuration are added.
395 -; Setting to "no" will make all environment variables available to PHP code
396 -; via getenv(), $_ENV and $_SERVER.
397 -; Default Value: yes
398 -;clear_env = no
399 -
400 -; Limits the extensions of the main script FPM will allow to parse. This can
401 -; prevent configuration mistakes on the web server side. You should only limit
402 -; FPM to .php extensions to prevent malicious users to use other extensions to
403 -; exectute php code.
404 -; Note: set an empty value to allow all extensions.
405 -; Default Value: .php
406 -;security.limit_extensions = .php .php3 .php4 .php5
407
408 -; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
409 -; the current environment.
410 -; Default Value: clean env
411 -;env[HOSTNAME] = $HOSTNAME
412 -;env[PATH] = /usr/local/bin:/usr/bin:/bin
413 -;env[TMP] = /tmp
414 -;env[TMPDIR] = /tmp
415 -;env[TEMP] = /tmp
416 -
417 -; Additional php.ini defines, specific to this pool of workers. These settings
418 -; overwrite the values previously defined in the php.ini. The directives are the
419 -; same as the PHP SAPI:
420 -;   php_value/php_flag             - you can set classic ini defines which can
421 -;                                    be overwritten from PHP call 'ini_set'. 
422 -;   php_admin_value/php_admin_flag - these directives won't be overwritten by
423 -;                                     PHP call 'ini_set'
424 -; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
425 -
426 -; Defining 'extension' will load the corresponding shared extension from
427 -; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
428 -; overwrite previously defined php.ini values, but will append the new value
429 -; instead.
430 -
431 -; Note: path INI options can be relative and will be expanded with the prefix
432 -; (pool, global or @prefix@)
433 -
434 -; Default Value: nothing is defined by default except the values in php.ini and
435 -;                specified at startup with the -d argument
436 -;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
437 -;php_flag[display_errors] = off
438 -;php_admin_value[error_log] = /var/log/fpm-php.www.log
439 -;php_admin_flag[log_errors] = on
440 -;php_admin_value[memory_limit] = 32M
441 diff -urNpa php-5.6.35.orig/sapi/fpm/php-fpm.conf-d.in php-5.6.35/sapi/fpm/php-fpm.conf-d.in
442 --- php-5.6.35.orig/sapi/fpm/php-fpm.conf-d.in  1970-01-01 00:00:00.000000000 +0000
443 +++ php-5.6.35/sapi/fpm/php-fpm.conf-d.in       2018-04-12 10:04:12.417687518 +0000
444 @@ -0,0 +1,417 @@
445 +; Start a new pool named 'www'.
446 +; the variable $pool can we used in any directive and will be replaced by the
447 +; pool name ('www' here)
448 +[www]
449 +
450 +; Per pool prefix
451 +; It only applies on the following directives:
452 +; - 'access.log'
453 +; - 'slowlog'
454 +; - 'listen' (unixsocket)
455 +; - 'chroot'
456 +; - 'chdir'
457 +; - 'php_values'
458 +; - 'php_admin_values'
459 +; When not set, the global prefix (or @php_fpm_prefix@) applies instead.
460 +; Note: This directive can also be relative to the global prefix.
461 +; Default Value: none
462 +;prefix = /path/to/pools/$pool
463 +
464 +; Unix user/group of processes
465 +; Note: The user is mandatory. If the group is not set, the default user's group
466 +;       will be used.
467 +user = @php_fpm_user@
468 +group = @php_fpm_group@
469 +
470 +; The address on which to accept FastCGI requests.
471 +; Valid syntaxes are:
472 +;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
473 +;                            a specific port;
474 +;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
475 +;                            a specific port;
476 +;   'port'                 - to listen on a TCP socket to all IPv4 addresses on a
477 +;                            specific port;
478 +;   '[::]:port'            - to listen on a TCP socket to all addresses
479 +;                            (IPv6 and IPv4-mapped) on a specific port;
480 +;   '/path/to/unix/socket' - to listen on a unix socket.
481 +; Note: This value is mandatory.
482 +listen = 127.0.0.1:9000
483 +
484 +; Set listen(2) backlog.
485 +; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
486 +;listen.backlog = 65535
487 +
488 +; Set permissions for unix socket, if one is used. In Linux, read/write
489 +; permissions must be set in order to allow connections from a web server. Many
490 +; BSD-derived systems allow connections regardless of permissions. 
491 +; Default Values: user and group are set as the running user
492 +;                 mode is set to 0660
493 +;listen.owner = @php_fpm_user@
494 +;listen.group = @php_fpm_group@
495 +;listen.mode = 0660
496 +; When POSIX Access Control Lists are supported you can set them using
497 +; these options, value is a comma separated list of user/group names.
498 +; When set, listen.owner and listen.group are ignored
499 +;listen.acl_users =
500 +;listen.acl_groups =
501
502 +; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
503 +; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
504 +; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
505 +; must be separated by a comma. If this value is left blank, connections will be
506 +; accepted from any ip address.
507 +; Default Value: any
508 +;listen.allowed_clients = 127.0.0.1
509 +
510 +; Specify the nice(2) priority to apply to the pool processes (only if set)
511 +; The value can vary from -19 (highest priority) to 20 (lower priority)
512 +; Note: - It will only work if the FPM master process is launched as root
513 +;       - The pool processes will inherit the master process priority
514 +;         unless it specified otherwise
515 +; Default Value: no set
516 +; process.priority = -19
517 +
518 +; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
519 +; or group is differrent than the master process user. It allows to create process
520 +; core dump and ptrace the process for the pool user.
521 +; Default Value: no
522 +; process.dumpable = yes
523 +
524 +; Choose how the process manager will control the number of child processes.
525 +; Possible Values:
526 +;   static  - a fixed number (pm.max_children) of child processes;
527 +;   dynamic - the number of child processes are set dynamically based on the
528 +;             following directives. With this process management, there will be
529 +;             always at least 1 children.
530 +;             pm.max_children      - the maximum number of children that can
531 +;                                    be alive at the same time.
532 +;             pm.start_servers     - the number of children created on startup.
533 +;             pm.min_spare_servers - the minimum number of children in 'idle'
534 +;                                    state (waiting to process). If the number
535 +;                                    of 'idle' processes is less than this
536 +;                                    number then some children will be created.
537 +;             pm.max_spare_servers - the maximum number of children in 'idle'
538 +;                                    state (waiting to process). If the number
539 +;                                    of 'idle' processes is greater than this
540 +;                                    number then some children will be killed.
541 +;  ondemand - no children are created at startup. Children will be forked when
542 +;             new requests will connect. The following parameter are used:
543 +;             pm.max_children           - the maximum number of children that
544 +;                                         can be alive at the same time.
545 +;             pm.process_idle_timeout   - The number of seconds after which
546 +;                                         an idle process will be killed.
547 +; Note: This value is mandatory.
548 +pm = dynamic
549 +
550 +; The number of child processes to be created when pm is set to 'static' and the
551 +; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
552 +; This value sets the limit on the number of simultaneous requests that will be
553 +; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
554 +; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
555 +; CGI. The below defaults are based on a server without much resources. Don't
556 +; forget to tweak pm.* to fit your needs.
557 +; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
558 +; Note: This value is mandatory.
559 +pm.max_children = 5
560 +
561 +; The number of child processes created on startup.
562 +; Note: Used only when pm is set to 'dynamic'
563 +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
564 +pm.start_servers = 2
565 +
566 +; The desired minimum number of idle server processes.
567 +; Note: Used only when pm is set to 'dynamic'
568 +; Note: Mandatory when pm is set to 'dynamic'
569 +pm.min_spare_servers = 1
570 +
571 +; The desired maximum number of idle server processes.
572 +; Note: Used only when pm is set to 'dynamic'
573 +; Note: Mandatory when pm is set to 'dynamic'
574 +pm.max_spare_servers = 3
575 +
576 +; The number of seconds after which an idle process will be killed.
577 +; Note: Used only when pm is set to 'ondemand'
578 +; Default Value: 10s
579 +;pm.process_idle_timeout = 10s;
580
581 +; The number of requests each child process should execute before respawning.
582 +; This can be useful to work around memory leaks in 3rd party libraries. For
583 +; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
584 +; Default Value: 0
585 +;pm.max_requests = 500
586 +
587 +; The URI to view the FPM status page. If this value is not set, no URI will be
588 +; recognized as a status page. It shows the following informations:
589 +;   pool                 - the name of the pool;
590 +;   process manager      - static, dynamic or ondemand;
591 +;   start time           - the date and time FPM has started;
592 +;   start since          - number of seconds since FPM has started;
593 +;   accepted conn        - the number of request accepted by the pool;
594 +;   listen queue         - the number of request in the queue of pending
595 +;                          connections (see backlog in listen(2));
596 +;   max listen queue     - the maximum number of requests in the queue
597 +;                          of pending connections since FPM has started;
598 +;   listen queue len     - the size of the socket queue of pending connections;
599 +;   idle processes       - the number of idle processes;
600 +;   active processes     - the number of active processes;
601 +;   total processes      - the number of idle + active processes;
602 +;   max active processes - the maximum number of active processes since FPM
603 +;                          has started;
604 +;   max children reached - number of times, the process limit has been reached,
605 +;                          when pm tries to start more children (works only for
606 +;                          pm 'dynamic' and 'ondemand');
607 +; Value are updated in real time.
608 +; Example output:
609 +;   pool:                 www
610 +;   process manager:      static
611 +;   start time:           01/Jul/2011:17:53:49 +0200
612 +;   start since:          62636
613 +;   accepted conn:        190460
614 +;   listen queue:         0
615 +;   max listen queue:     1
616 +;   listen queue len:     42
617 +;   idle processes:       4
618 +;   active processes:     11
619 +;   total processes:      15
620 +;   max active processes: 12
621 +;   max children reached: 0
622 +;
623 +; By default the status page output is formatted as text/plain. Passing either
624 +; 'html', 'xml' or 'json' in the query string will return the corresponding
625 +; output syntax. Example:
626 +;   http://www.foo.bar/status
627 +;   http://www.foo.bar/status?json
628 +;   http://www.foo.bar/status?html
629 +;   http://www.foo.bar/status?xml
630 +;
631 +; By default the status page only outputs short status. Passing 'full' in the
632 +; query string will also return status for each pool process.
633 +; Example: 
634 +;   http://www.foo.bar/status?full
635 +;   http://www.foo.bar/status?json&full
636 +;   http://www.foo.bar/status?html&full
637 +;   http://www.foo.bar/status?xml&full
638 +; The Full status returns for each process:
639 +;   pid                  - the PID of the process;
640 +;   state                - the state of the process (Idle, Running, ...);
641 +;   start time           - the date and time the process has started;
642 +;   start since          - the number of seconds since the process has started;
643 +;   requests             - the number of requests the process has served;
644 +;   request duration     - the duration in Âµs of the requests;
645 +;   request method       - the request method (GET, POST, ...);
646 +;   request URI          - the request URI with the query string;
647 +;   content length       - the content length of the request (only with POST);
648 +;   user                 - the user (PHP_AUTH_USER) (or '-' if not set);
649 +;   script               - the main script called (or '-' if not set);
650 +;   last request cpu     - the %cpu the last request consumed
651 +;                          it's always 0 if the process is not in Idle state
652 +;                          because CPU calculation is done when the request
653 +;                          processing has terminated;
654 +;   last request memory  - the max amount of memory the last request consumed
655 +;                          it's always 0 if the process is not in Idle state
656 +;                          because memory calculation is done when the request
657 +;                          processing has terminated;
658 +; If the process is in Idle state, then informations are related to the
659 +; last request the process has served. Otherwise informations are related to
660 +; the current request being served.
661 +; Example output:
662 +;   ************************
663 +;   pid:                  31330
664 +;   state:                Running
665 +;   start time:           01/Jul/2011:17:53:49 +0200
666 +;   start since:          63087
667 +;   requests:             12808
668 +;   request duration:     1250261
669 +;   request method:       GET
670 +;   request URI:          /test_mem.php?N=10000
671 +;   content length:       0
672 +;   user:                 -
673 +;   script:               /home/fat/web/docs/php/test_mem.php
674 +;   last request cpu:     0.00
675 +;   last request memory:  0
676 +;
677 +; Note: There is a real-time FPM status monitoring sample web page available
678 +;       It's available in: @EXPANDED_DATADIR@/fpm/status.html
679 +;
680 +; Note: The value must start with a leading slash (/). The value can be
681 +;       anything, but it may not be a good idea to use the .php extension or it
682 +;       may conflict with a real PHP file.
683 +; Default Value: not set 
684 +;pm.status_path = /status
685
686 +; The ping URI to call the monitoring page of FPM. If this value is not set, no
687 +; URI will be recognized as a ping page. This could be used to test from outside
688 +; that FPM is alive and responding, or to
689 +; - create a graph of FPM availability (rrd or such);
690 +; - remove a server from a group if it is not responding (load balancing);
691 +; - trigger alerts for the operating team (24/7).
692 +; Note: The value must start with a leading slash (/). The value can be
693 +;       anything, but it may not be a good idea to use the .php extension or it
694 +;       may conflict with a real PHP file.
695 +; Default Value: not set
696 +;ping.path = /ping
697 +
698 +; This directive may be used to customize the response of a ping request. The
699 +; response is formatted as text/plain with a 200 response code.
700 +; Default Value: pong
701 +;ping.response = pong
702 +
703 +; The access log file
704 +; Default: not set
705 +;access.log = log/$pool.access.log
706 +
707 +; The access log format.
708 +; The following syntax is allowed
709 +;  %%: the '%' character
710 +;  %C: %CPU used by the request
711 +;      it can accept the following format:
712 +;      - %{user}C for user CPU only
713 +;      - %{system}C for system CPU only
714 +;      - %{total}C  for user + system CPU (default)
715 +;  %d: time taken to serve the request
716 +;      it can accept the following format:
717 +;      - %{seconds}d (default)
718 +;      - %{miliseconds}d
719 +;      - %{mili}d
720 +;      - %{microseconds}d
721 +;      - %{micro}d
722 +;  %e: an environment variable (same as $_ENV or $_SERVER)
723 +;      it must be associated with embraces to specify the name of the env
724 +;      variable. Some exemples:
725 +;      - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
726 +;      - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
727 +;  %f: script filename
728 +;  %l: content-length of the request (for POST request only)
729 +;  %m: request method
730 +;  %M: peak of memory allocated by PHP
731 +;      it can accept the following format:
732 +;      - %{bytes}M (default)
733 +;      - %{kilobytes}M
734 +;      - %{kilo}M
735 +;      - %{megabytes}M
736 +;      - %{mega}M
737 +;  %n: pool name
738 +;  %o: output header
739 +;      it must be associated with embraces to specify the name of the header:
740 +;      - %{Content-Type}o
741 +;      - %{X-Powered-By}o
742 +;      - %{Transfert-Encoding}o
743 +;      - ....
744 +;  %p: PID of the child that serviced the request
745 +;  %P: PID of the parent of the child that serviced the request
746 +;  %q: the query string 
747 +;  %Q: the '?' character if query string exists
748 +;  %r: the request URI (without the query string, see %q and %Q)
749 +;  %R: remote IP address
750 +;  %s: status (response code)
751 +;  %t: server time the request was received
752 +;      it can accept a strftime(3) format:
753 +;      %d/%b/%Y:%H:%M:%S %z (default)
754 +;  %T: time the log has been written (the request has finished)
755 +;      it can accept a strftime(3) format:
756 +;      %d/%b/%Y:%H:%M:%S %z (default)
757 +;  %u: remote user
758 +;
759 +; Default: "%R - %u %t \"%m %r\" %s"
760 +;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
761
762 +; The log file for slow requests
763 +; Default Value: not set
764 +; Note: slowlog is mandatory if request_slowlog_timeout is set
765 +;slowlog = log/$pool.log.slow
766
767 +; The timeout for serving a single request after which a PHP backtrace will be
768 +; dumped to the 'slowlog' file. A value of '0s' means 'off'.
769 +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
770 +; Default Value: 0
771 +;request_slowlog_timeout = 0
772
773 +; The timeout for serving a single request after which the worker process will
774 +; be killed. This option should be used when the 'max_execution_time' ini option
775 +; does not stop script execution for some reason. A value of '0' means 'off'.
776 +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
777 +; Default Value: 0
778 +;request_terminate_timeout = 0
779
780 +; Set open file descriptor rlimit.
781 +; Default Value: system defined value
782 +;rlimit_files = 1024
783
784 +; Set max core size rlimit.
785 +; Possible Values: 'unlimited' or an integer greater or equal to 0
786 +; Default Value: system defined value
787 +;rlimit_core = 0
788
789 +; Chroot to this directory at the start. This value must be defined as an
790 +; absolute path. When this value is not set, chroot is not used.
791 +; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
792 +; of its subdirectories. If the pool prefix is not set, the global prefix
793 +; will be used instead.
794 +; Note: chrooting is a great security feature and should be used whenever 
795 +;       possible. However, all PHP paths will be relative to the chroot
796 +;       (error_log, sessions.save_path, ...).
797 +; Default Value: not set
798 +;chroot = 
799
800 +; Chdir to this directory at the start.
801 +; Note: relative path can be used.
802 +; Default Value: current directory or / when chroot
803 +;chdir = /var/www
804
805 +; Redirect worker stdout and stderr into main error log. If not set, stdout and
806 +; stderr will be redirected to /dev/null according to FastCGI specs.
807 +; Note: on highloaded environement, this can cause some delay in the page
808 +; process time (several ms).
809 +; Default Value: no
810 +;catch_workers_output = yes
811 +
812 +; Clear environment in FPM workers
813 +; Prevents arbitrary environment variables from reaching FPM worker processes
814 +; by clearing the environment in workers before env vars specified in this
815 +; pool configuration are added.
816 +; Setting to "no" will make all environment variables available to PHP code
817 +; via getenv(), $_ENV and $_SERVER.
818 +; Default Value: yes
819 +;clear_env = no
820 +
821 +; Limits the extensions of the main script FPM will allow to parse. This can
822 +; prevent configuration mistakes on the web server side. You should only limit
823 +; FPM to .php extensions to prevent malicious users to use other extensions to
824 +; exectute php code.
825 +; Note: set an empty value to allow all extensions.
826 +; Default Value: .php
827 +;security.limit_extensions = .php .php3 .php4 .php5
828
829 +; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
830 +; the current environment.
831 +; Default Value: clean env
832 +;env[HOSTNAME] = $HOSTNAME
833 +;env[PATH] = /usr/local/bin:/usr/bin:/bin
834 +;env[TMP] = /tmp
835 +;env[TMPDIR] = /tmp
836 +;env[TEMP] = /tmp
837 +
838 +; Additional php.ini defines, specific to this pool of workers. These settings
839 +; overwrite the values previously defined in the php.ini. The directives are the
840 +; same as the PHP SAPI:
841 +;   php_value/php_flag             - you can set classic ini defines which can
842 +;                                    be overwritten from PHP call 'ini_set'. 
843 +;   php_admin_value/php_admin_flag - these directives won't be overwritten by
844 +;                                     PHP call 'ini_set'
845 +; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
846 +
847 +; Defining 'extension' will load the corresponding shared extension from
848 +; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
849 +; overwrite previously defined php.ini values, but will append the new value
850 +; instead.
851 +
852 +; Note: path INI options can be relative and will be expanded with the prefix
853 +; (pool, global or @prefix@)
854 +
855 +; Default Value: nothing is defined by default except the values in php.ini and
856 +;                specified at startup with the -d argument
857 +;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
858 +;php_flag[display_errors] = off
859 +;php_admin_value[error_log] = /var/log/fpm-php.www.log
860 +;php_admin_flag[log_errors] = on
861 +;php_admin_value[memory_limit] = 32M
862 diff -urNpa php-5.6.35.orig/sapi/fpm/config.m4 php-5.6.35/sapi/fpm/config.m4
863 --- php-5.6.35.orig/sapi/fpm/config.m4  2018-03-28 21:28:58.000000000 +0000
864 +++ php-5.6.35/sapi/fpm/config.m4       2018-04-12 10:02:48.432688464 +0000
865 @@ -667,7 +667,7 @@ if test "$PHP_FPM" != "no"; then
866  
867    PHP_ADD_BUILD_DIR(sapi/fpm/fpm)
868    PHP_ADD_BUILD_DIR(sapi/fpm/fpm/events)
869 -  PHP_OUTPUT(sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html)
870 +  PHP_OUTPUT(sapi/fpm/php-fpm.conf sapi/fpm/php-fpm.conf-d sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html)
871    PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/fpm/Makefile.frag])
872  
873    SAPI_FPM_PATH=sapi/fpm/php-fpm
874 diff -urNpa php-5.6.35.orig/sapi/fpm/Makefile.frag php-5.6.35/sapi/fpm/Makefile.frag
875 --- php-5.6.35.orig/sapi/fpm/Makefile.frag      2018-03-28 21:28:58.000000000 +0000
876 +++ php-5.6.35/sapi/fpm/Makefile.frag   2018-04-12 10:02:48.432688464 +0000
877 @@ -11,8 +11,9 @@ install-fpm: $(SAPI_FPM_PATH)
878         @$(INSTALL) -m 0755 $(SAPI_FPM_PATH) $(INSTALL_ROOT)$(sbindir)/$(program_prefix)php-fpm$(program_suffix)$(EXEEXT)
879  
880         @echo "Installing PHP FPM config:        $(INSTALL_ROOT)$(sysconfdir)/" && \
881 -       $(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir) || :
882 +       $(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)/fpm.d || :
883         @$(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf.default || :
884 +       @$(INSTALL_DATA) sapi/fpm/php-fpm.conf-d $(INSTALL_ROOT)$(sysconfdir)/fpm.d/www.conf.default || :
885  
886         @echo "Installing PHP FPM man page:      $(INSTALL_ROOT)$(mandir)/man8/"
887         @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man8