ports/190190: [PATCH] lang/php5: IPv6 support for FPM sapi
Melvyn Sopacua
melvyn at magemana.nl
Sat May 24 23:30:00 UTC 2014
>Number: 190190
>Category: ports
>Synopsis: [PATCH] lang/php5: IPv6 support for FPM sapi
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat May 24 23:30:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Melvyn Sopacua
>Release: FreeBSD 9.2-RELEASE-p6 amd64
>Organization:
>Environment:
System: FreeBSD fire.magemana.nl 9.2-RELEASE-p6 FreeBSD 9.2-RELEASE-p6 #2 r266258: Sat May 17 00:26:49 CEST 2014 melvyn at fire.magemana.nl:/usr/obj/usr/src/sys/TRANSIP amd64
>Description:
Php-fpm cannot listen on IPv6 sockets, making it impossible to run in IPv6 only
jails. See also: https://bugs.php.net/bug.php?id=55508
>How-To-Repeat:
Add [::1]:9000 as listen directive in php-fpm.conf
>Fix:
Patch obtained from github and reworked a bit for conflicts in php-fpm.conf.in
will add support IPv6.
Port provides it through non-default option FPM_IPV6.
Buildarchive: <https://redports.org/buildarchive/20140524225300-60945/>
(forced FPM_IPV6 build)
Result:
% sockstat -6l | head -2
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
www php-fpm 69257 0 tcp6 2a01:7c8:aaae:25e::10:9000 *:*
--- php5-fpm-ipv6.patch begins here ---
diff -r 8411b4e26073 lang/php5/Makefile
--- a/lang/php5/Makefile Fri May 23 16:27:38 2014 +0000
+++ b/lang/php5/Makefile Sun May 25 01:10:53 2014 +0200
@@ -3,7 +3,7 @@
PORTNAME= php5
PORTVERSION= 5.4.28
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES?= lang devel www
MASTER_SITES= ${MASTER_SITE_PHP}
MASTER_SITE_SUBDIR= distributions
@@ -36,13 +36,15 @@
USE_GNOME= libxml2
-OPTIONS_DEFINE+=CLI CGI FPM EMBED DEBUG DTRACE IPV6 MAILHEAD LINKTHR ZTS
+OPTIONS_DEFINE+=CLI CGI FPM FPM_IPV6 EMBED DEBUG DTRACE IPV6 MAILHEAD \
+ LINKTHR ZTS
OPTIONS_DEFAULT=CLI CGI FPM IPV6 LINKTHR
OPTIONS_SUB= yes
CLI_DESC= Build CLI version
CGI_DESC= Build CGI version
FPM_DESC= Build FPM version
+FPM_IPV6_DESC= Apply experimental patch to enable ipv6 support
EMBED_DESC= Build embedded library
DEBUG_DESC= Enable debug
DTRACE_DESC= Enable DTrace support
@@ -85,6 +87,13 @@
CONFIGURE_ARGS+=--enable-fpm \
--with-fpm-user=${WWWOWN} \
--with-fpm-group=${WWWGRP}
+# Wrap it properly
+# We need IPV6 support and patch doesn't make sense if PHP_FPM isn't enabled.
+.if ${PORT_OPTIONS:MIPV6}
+.if ${PORT_OPTIONS:MFPM_IPV6}
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-php-fpm-ipv6:-p1
+.endif
+.endif
.endif
.if defined(OPTIONS_FILE_SET) && ${OPTIONS_FILE_SET:MAPACHE}
diff -r 8411b4e26073 lang/php5/files/extra-patch-php-fpm-ipv6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php5/files/extra-patch-php-fpm-ipv6 Sun May 25 01:10:53 2014 +0200
@@ -0,0 +1,597 @@
+From e767189535ff02cee43dfefecfdb5d36b3c81447 Mon Sep 17 00:00:00 2001
+From: Robin Gloster <robin at loc-com.de>
+Date: Sun, 23 Mar 2014 17:43:20 +0100
+Subject: [PATCH 1/3] add IPv6 support to php-fpm
+
+---
+ sapi/fpm/fpm/fpm_sockets.c | 82 +++++++++++++++++++++++-----------------------
+ sapi/fpm/fpm/fpm_sockets.h | 6 ----
+ sapi/fpm/tests/003.phpt | 53 ++++++++++++++++++++++++++++++
+ 3 files changed, 94 insertions(+), 47 deletions(-)
+ create mode 100644 sapi/fpm/tests/003.phpt
+
+diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c
+index e056565..583b1fa 100644
+--- a/sapi/fpm/fpm/fpm_sockets.c
++++ b/sapi/fpm/fpm/fpm_sockets.c
+@@ -39,29 +39,6 @@ struct listening_socket_s {
+
+ static struct fpm_array_s sockets_list;
+
+-static int fpm_sockets_resolve_af_inet(char *node, char *service, struct sockaddr_in *addr) /* {{{ */
+-{
+- struct addrinfo *res;
+- struct addrinfo hints;
+- int ret;
+-
+- memset(&hints, 0, sizeof(hints));
+- hints.ai_family = AF_INET;
+- ret = getaddrinfo(node, service, &hints, &res);
+-
+- if (ret != 0) {
+- zlog(ZLOG_ERROR, "can't resolve hostname '%s%s%s': getaddrinfo said: %s%s%s\n",
+- node, service ? ":" : "", service ? service : "",
+- gai_strerror(ret), ret == EAI_SYSTEM ? ", system error: " : "", ret == EAI_SYSTEM ? strerror(errno) : "");
+- return -1;
+- }
+-
+- *addr = *(struct sockaddr_in *) res->ai_addr;
+- freeaddrinfo(res);
+- return 0;
+-}
+-/* }}} */
+-
+ enum { FPM_GET_USE_SOCKET = 1, FPM_STORE_SOCKET = 2, FPM_STORE_USE_SOCKET = 3 };
+
+ static void fpm_sockets_cleanup(int which, void *arg) /* {{{ */
+@@ -98,14 +75,24 @@ static void fpm_sockets_cleanup(int which, void *arg) /* {{{ */
+ }
+ /* }}} */
+
++static void *fpm_get_in_addr(struct sockaddr *sa) /* {{{ */
++{
++ if (sa->sa_family == AF_INET) {
++ return &(((struct sockaddr_in*)sa)->sin_addr);
++ }
++
++ return &(((struct sockaddr_in6*)sa)->sin6_addr);
++}
++/* }}} */
++
+ static int fpm_sockets_hash_op(int sock, struct sockaddr *sa, char *key, int type, int op) /* {{{ */
+ {
+ if (key == NULL) {
+ switch (type) {
+ case FPM_AF_INET : {
+ struct sockaddr_in *sa_in = (struct sockaddr_in *) sa;
+- key = alloca(sizeof("xxx.xxx.xxx.xxx:ppppp"));
+- sprintf(key, "%u.%u.%u.%u:%u", IPQUAD(&sa_in->sin_addr), (unsigned int) ntohs(sa_in->sin_port));
++ key = alloca(INET6_ADDRSTRLEN);
++ inet_ntop(sa->sa_family, fpm_get_in_addr(sa), key, sizeof key);
+ break;
+ }
+
+@@ -254,11 +241,14 @@ enum fpm_address_domain fpm_sockets_domain_from_address(char *address) /* {{{ */
+
+ static int fpm_socket_af_inet_listening_socket(struct fpm_worker_pool_s *wp) /* {{{ */
+ {
+- struct sockaddr_in sa_in;
++ struct addrinfo hints, *servinfo, *p;
+ char *dup_address = strdup(wp->config->listen_address);
+- char *port_str = strchr(dup_address, ':');
++ char *port_str = strrchr(dup_address, ':');
+ char *addr = NULL;
++ int addr_len;
+ int port = 0;
++ int sock;
++ int status;
+
+ if (port_str) { /* this is host:port pair */
+ *port_str++ = '\0';
+@@ -274,23 +264,33 @@ static int fpm_socket_af_inet_listening_socket(struct fpm_worker_pool_s *wp) /*
+ return -1;
+ }
+
+- memset(&sa_in, 0, sizeof(sa_in));
++ // strip brackets from address for getaddrinfo
++ addr_len = strlen(addr);
++ if (addr[0] == '[' && addr[addr_len - 1] == ']') {
++ addr[addr_len - 1] = '\0';
++ addr++;
++ }
+
+- if (addr) {
+- sa_in.sin_addr.s_addr = inet_addr(addr);
+- if (sa_in.sin_addr.s_addr == INADDR_NONE) { /* do resolve */
+- if (0 > fpm_sockets_resolve_af_inet(addr, NULL, &sa_in)) {
+- return -1;
+- }
+- zlog(ZLOG_NOTICE, "address '%s' resolved as %u.%u.%u.%u", addr, IPQUAD(&sa_in.sin_addr));
+- }
+- } else {
+- sa_in.sin_addr.s_addr = htonl(INADDR_ANY);
++ memset(&hints, 0, sizeof hints);
++ hints.ai_family = AF_UNSPEC;
++ hints.ai_socktype = SOCK_STREAM;
++
++ if ((status = getaddrinfo(addr, port_str, &hints, &servinfo)) != 0) {
++ zlog(ZLOG_ERROR, "getaddrinfo: %s\n", gai_strerror(status));
++ return -1;
+ }
+- sa_in.sin_family = AF_INET;
+- sa_in.sin_port = htons(port);
++
+ free(dup_address);
+- return fpm_sockets_get_listening_socket(wp, (struct sockaddr *) &sa_in, sizeof(struct sockaddr_in));
++
++ for (p = servinfo; p != NULL; p = p->ai_next) {
++ if ((sock = fpm_sockets_get_listening_socket(wp, p->ai_addr, p->ai_addrlen)) != -1) {
++ break;
++ }
++ }
++
++ freeaddrinfo(servinfo);
++
++ return sock;
+ }
+ /* }}} */
+
+diff --git a/sapi/fpm/fpm/fpm_sockets.h b/sapi/fpm/fpm/fpm_sockets.h
+index 121c016..446c78e 100644
+--- a/sapi/fpm/fpm/fpm_sockets.h
++++ b/sapi/fpm/fpm/fpm_sockets.h
+@@ -45,10 +45,4 @@ static inline int fd_set_blocked(int fd, int blocked) /* {{{ */
+ }
+ /* }}} */
+
+-#define IPQUAD(sin_addr) \
+- (unsigned int) ((unsigned char *) &(sin_addr)->s_addr)[0], \
+- (unsigned int) ((unsigned char *) &(sin_addr)->s_addr)[1], \
+- (unsigned int) ((unsigned char *) &(sin_addr)->s_addr)[2], \
+- (unsigned int) ((unsigned char *) &(sin_addr)->s_addr)[3]
+-
+ #endif
+diff --git a/sapi/fpm/tests/003.phpt b/sapi/fpm/tests/003.phpt
+new file mode 100644
+index 0000000..389cb24
+--- /dev/null
++++ b/sapi/fpm/tests/003.phpt
+@@ -0,0 +1,53 @@
++--TEST--
++FPM: Test IPv6 support
++--SKIPIF--
++<?php include "skipif.inc"; ?>
++--FILE--
++<?php
++
++include "include.inc";
++
++$logfile = dirname(__FILE__).'/php-fpm.log.tmp';
++
++$cfg = <<<EOT
++[global]
++error_log = $logfile
++[unconfined]
++listen = [::1]:9000
++pm = dynamic
++pm.max_children = 5
++pm.start_servers = 2
++pm.min_spare_servers = 1
++pm.max_spare_servers = 3
++EOT;
++
++$fpm = run_fpm($cfg, $tail);
++if (is_resource($fpm)) {
++ var_dump(fgets($tail));
++ var_dump(fgets($tail));
++ $i = 0;
++ while (($i++ < 30) && !($fp = fsockopen('[::1]', 9000))) {
++ usleep(10000);
++ }
++ if ($fp) {
++ echo "Done\n";
++ fclose($fp);
++ }
++ proc_terminate($fpm);
++ stream_get_contents($tail);
++ fclose($tail);
++ proc_close($fpm);
++}
++
++?>
++--EXPECTF--
++string(%d) "[%d-%s-%d %d:%d:%d] NOTICE: fpm is running, pid %d
++"
++string(%d) "[%d-%s-%d %d:%d:%d] NOTICE: ready to handle connections
++"
++Done
++--CLEAN--
++<?php
++ $logfile = dirname(__FILE__).'/php-fpm.log.tmp';
++ @unlink($logfile);
++?>
+--
+1.9.3
+
+
+From 6057125f4383c661b0c1af71a9e2b026f6ebecf6 Mon Sep 17 00:00:00 2001
+From: Robin Gloster <robin at loc-com.de>
+Date: Mon, 24 Mar 2014 00:15:13 +0100
+Subject: [PATCH 2/3] check for addr==null and add ipv6 to conf
+
+---
+ sapi/fpm/fpm/fpm_sockets.c | 11 ++++++-----
+ sapi/fpm/php-fpm.conf.in | 48 ++++++++++++++++++++++++----------------------
+ 2 files changed, 31 insertions(+), 28 deletions(-)
+
+diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c
+index 583b1fa..da14d63 100644
+--- a/sapi/fpm/fpm/fpm_sockets.c
++++ b/sapi/fpm/fpm/fpm_sockets.c
+@@ -90,7 +90,6 @@ static int fpm_sockets_hash_op(int sock, struct sockaddr *sa, char *key, int typ
+ if (key == NULL) {
+ switch (type) {
+ case FPM_AF_INET : {
+- struct sockaddr_in *sa_in = (struct sockaddr_in *) sa;
+ key = alloca(INET6_ADDRSTRLEN);
+ inet_ntop(sa->sa_family, fpm_get_in_addr(sa), key, sizeof key);
+ break;
+@@ -265,10 +264,12 @@ static int fpm_socket_af_inet_listening_socket(struct fpm_worker_pool_s *wp) /*
+ }
+
+ // strip brackets from address for getaddrinfo
+- addr_len = strlen(addr);
+- if (addr[0] == '[' && addr[addr_len - 1] == ']') {
+- addr[addr_len - 1] = '\0';
+- addr++;
++ if (addr != NULL) {
++ addr_len = strlen(addr);
++ if (addr[0] == '[' && addr[addr_len - 1] == ']') {
++ addr[addr_len - 1] = '\0';
++ addr++;
++ }
+ }
+
+ memset(&hints, 0, sizeof hints);
+diff --git a/sapi/fpm/php-fpm.conf.in b/sapi/fpm/php-fpm.conf.in
+index ab03736..d6ff2ae 100644
+--- a/sapi/fpm/php-fpm.conf.in
++++ b/sapi/fpm/php-fpm.conf.in
+@@ -55,7 +55,7 @@
+ ; Default Value: 0
+ ;emergency_restart_threshold = 0
+
+-; Interval of time used by emergency_restart_interval to determine when
++; Interval of time used by emergency_restart_interval to determine when
+ ; a graceful restart will be initiated. This can be useful to work around
+ ; accidental corruptions in an accelerator's shared memory.
+ ; Available Units: s(econds), m(inutes), h(ours), or d(ays)
+@@ -87,11 +87,11 @@
+ ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
+ ; Default Value: yes
+ ;daemonize = yes
+-
++
+ ; Set open file descriptor rlimit for the master process.
+ ; Default Value: system defined value
+ ;rlimit_files = 1024
+-
++
+ ; Set max core size rlimit for the master process.
+ ; Possible Values: 'unlimited' or an integer greater or equal to 0
+ ; Default Value: system defined value
+@@ -116,7 +116,7 @@
+ ;systemd_interval = 10
+
+ ;;;;;;;;;;;;;;;;;;;;
+-; Pool Definitions ;
++; Pool Definitions ;
+ ;;;;;;;;;;;;;;;;;;;;
+
+ ; Multiple pools of child processes may be started with different listening
+@@ -152,6 +152,8 @@ group = @php_fpm_group@
+ ; Valid syntaxes are:
+ ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
+ ; a specific port;
++; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific ipv6 address on
++; a specific port;
+ ; 'port' - to listen on a TCP socket to all addresses on a
+ ; specific port;
+ ; '/path/to/unix/socket' - to listen on a unix socket.
+@@ -243,7 +245,7 @@ pm.max_spare_servers = 3
+ ; Note: Used only when pm is set to 'ondemand'
+ ; Default Value: 10s
+ ;pm.process_idle_timeout = 10s;
+-
++
+ ; The number of requests each child process should execute before respawning.
+ ; This can be useful to work around memory leaks in 3rd party libraries. For
+ ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
+@@ -296,7 +298,7 @@ pm.max_spare_servers = 3
+ ;
+ ; By default the status page only outputs short status. Passing 'full' in the
+ ; query string will also return status for each pool process.
+-; Example:
++; Example:
+ ; http://www.foo.bar/status?full
+ ; http://www.foo.bar/status?json&full
+ ; http://www.foo.bar/status?html&full
+@@ -346,9 +348,9 @@ pm.max_spare_servers = 3
+ ; Note: The value must start with a leading slash (/). The value can be
+ ; anything, but it may not be a good idea to use the .php extension or it
+ ; may conflict with a real PHP file.
+-; Default Value: not set
++; Default Value: not set
+ ;pm.status_path = /status
+-
++
+ ; The ping URI to call the monitoring page of FPM. If this value is not set, no
+ ; URI will be recognized as a ping page. This could be used to test from outside
+ ; that FPM is alive and responding, or to
+@@ -409,7 +411,7 @@ pm.max_spare_servers = 3
+ ; - ....
+ ; %p: PID of the child that serviced the request
+ ; %P: PID of the parent of the child that serviced the request
+-; %q: the query string
++; %q: the query string
+ ; %Q: the '?' character if query string exists
+ ; %r: the request URI (without the query string, see %q and %Q)
+ ; %R: remote IP address
+@@ -424,50 +426,50 @@ pm.max_spare_servers = 3
+ ;
+ ; Default: "%R - %u %t \"%m %r\" %s"
+ ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
+-
++
+ ; The log file for slow requests
+ ; Default Value: not set
+ ; Note: slowlog is mandatory if request_slowlog_timeout is set
+ ;slowlog = log/$pool.log.slow
+-
++
+ ; The timeout for serving a single request after which a PHP backtrace will be
+ ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
+ ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+ ; Default Value: 0
+ ;request_slowlog_timeout = 0
+-
++
+ ; The timeout for serving a single request after which the worker process will
+ ; be killed. This option should be used when the 'max_execution_time' ini option
+ ; does not stop script execution for some reason. A value of '0' means 'off'.
+ ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+ ; Default Value: 0
+ ;request_terminate_timeout = 0
+-
++
+ ; Set open file descriptor rlimit.
+ ; Default Value: system defined value
+ ;rlimit_files = 1024
+-
++
+ ; Set max core size rlimit.
+ ; Possible Values: 'unlimited' or an integer greater or equal to 0
+ ; Default Value: system defined value
+ ;rlimit_core = 0
+-
++
+ ; Chroot to this directory at the start. This value must be defined as an
+ ; absolute path. When this value is not set, chroot is not used.
+ ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
+ ; of its subdirectories. If the pool prefix is not set, the global prefix
+ ; will be used instead.
+-; Note: chrooting is a great security feature and should be used whenever
++; Note: chrooting is a great security feature and should be used whenever
+ ; possible. However, all PHP paths will be relative to the chroot
+ ; (error_log, sessions.save_path, ...).
+ ; Default Value: not set
+-;chroot =
+-
++;chroot =
++
+ ; Chdir to this directory at the start.
+ ; Note: relative path can be used.
+ ; Default Value: current directory or / when chroot
+ ;chdir = /var/www
+-
++
+ ; Redirect worker stdout and stderr into main error log. If not set, stdout and
+ ; stderr will be redirected to /dev/null according to FastCGI specs.
+ ; Note: on highloaded environement, this can cause some delay in the page
+@@ -491,7 +493,7 @@ pm.max_spare_servers = 3
+ ; Note: set an empty value to allow all extensions.
+ ; Default Value: .php
+ ;security.limit_extensions = .php .php3 .php4 .php5
+-
++
+ ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
+ ; the current environment.
+ ; Default Value: clean env
+@@ -505,7 +507,7 @@ pm.max_spare_servers = 3
+ ; overwrite the values previously defined in the php.ini. The directives are the
+ ; same as the PHP SAPI:
+ ; php_value/php_flag - you can set classic ini defines which can
+-; be overwritten from PHP call 'ini_set'.
++; be overwritten from PHP call 'ini_set'.
+ ; php_admin_value/php_admin_flag - these directives won't be overwritten by
+ ; PHP call 'ini_set'
+ ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
+--
+1.9.3
+
+
+From 12c3e728c634f17232883068c14f36a68b78952a Mon Sep 17 00:00:00 2001
+From: Robin Gloster <robin at loc-com.de>
+Date: Thu, 3 Apr 2014 13:22:31 +0200
+Subject: [PATCH 3/3] revert whitespace
+
+---
+ sapi/fpm/php-fpm.conf.in | 48 ++++++++++++++++++++++++------------------------
+ 1 file changed, 24 insertions(+), 24 deletions(-)
+
+diff --git a/sapi/fpm/php-fpm.conf.in b/sapi/fpm/php-fpm.conf.in
+index d6ff2ae..8e242aa 100644
+--- a/sapi/fpm/php-fpm.conf.in
++++ b/sapi/fpm/php-fpm.conf.in
+@@ -55,7 +55,7 @@
+ ; Default Value: 0
+ ;emergency_restart_threshold = 0
+
+-; Interval of time used by emergency_restart_interval to determine when
++; Interval of time used by emergency_restart_interval to determine when
+ ; a graceful restart will be initiated. This can be useful to work around
+ ; accidental corruptions in an accelerator's shared memory.
+ ; Available Units: s(econds), m(inutes), h(ours), or d(ays)
+@@ -87,11 +87,11 @@
+ ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
+ ; Default Value: yes
+ ;daemonize = yes
+-
++
+ ; Set open file descriptor rlimit for the master process.
+ ; Default Value: system defined value
+ ;rlimit_files = 1024
+-
++
+ ; Set max core size rlimit for the master process.
+ ; Possible Values: 'unlimited' or an integer greater or equal to 0
+ ; Default Value: system defined value
+@@ -116,7 +116,7 @@
+ ;systemd_interval = 10
+
+ ;;;;;;;;;;;;;;;;;;;;
+-; Pool Definitions ;
++; Pool Definitions ;
+ ;;;;;;;;;;;;;;;;;;;;
+
+ ; Multiple pools of child processes may be started with different listening
+@@ -152,7 +152,7 @@ group = @php_fpm_group@
+ ; Valid syntaxes are:
+ ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
+ ; a specific port;
+-; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific ipv6 address on
++; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
+ ; a specific port;
+ ; 'port' - to listen on a TCP socket to all addresses on a
+ ; specific port;
+@@ -245,7 +245,7 @@ pm.max_spare_servers = 3
+ ; Note: Used only when pm is set to 'ondemand'
+ ; Default Value: 10s
+ ;pm.process_idle_timeout = 10s;
+-
++
+ ; The number of requests each child process should execute before respawning.
+ ; This can be useful to work around memory leaks in 3rd party libraries. For
+ ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
+@@ -298,7 +298,7 @@ pm.max_spare_servers = 3
+ ;
+ ; By default the status page only outputs short status. Passing 'full' in the
+ ; query string will also return status for each pool process.
+-; Example:
++; Example:
+ ; http://www.foo.bar/status?full
+ ; http://www.foo.bar/status?json&full
+ ; http://www.foo.bar/status?html&full
+@@ -348,9 +348,9 @@ pm.max_spare_servers = 3
+ ; Note: The value must start with a leading slash (/). The value can be
+ ; anything, but it may not be a good idea to use the .php extension or it
+ ; may conflict with a real PHP file.
+-; Default Value: not set
++; Default Value: not set
+ ;pm.status_path = /status
+-
++
+ ; The ping URI to call the monitoring page of FPM. If this value is not set, no
+ ; URI will be recognized as a ping page. This could be used to test from outside
+ ; that FPM is alive and responding, or to
+@@ -411,7 +411,7 @@ pm.max_spare_servers = 3
+ ; - ....
+ ; %p: PID of the child that serviced the request
+ ; %P: PID of the parent of the child that serviced the request
+-; %q: the query string
++; %q: the query string
+ ; %Q: the '?' character if query string exists
+ ; %r: the request URI (without the query string, see %q and %Q)
+ ; %R: remote IP address
+@@ -426,50 +426,50 @@ pm.max_spare_servers = 3
+ ;
+ ; Default: "%R - %u %t \"%m %r\" %s"
+ ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
+-
++
+ ; The log file for slow requests
+ ; Default Value: not set
+ ; Note: slowlog is mandatory if request_slowlog_timeout is set
+ ;slowlog = log/$pool.log.slow
+-
++
+ ; The timeout for serving a single request after which a PHP backtrace will be
+ ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
+ ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+ ; Default Value: 0
+ ;request_slowlog_timeout = 0
+-
++
+ ; The timeout for serving a single request after which the worker process will
+ ; be killed. This option should be used when the 'max_execution_time' ini option
+ ; does not stop script execution for some reason. A value of '0' means 'off'.
+ ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+ ; Default Value: 0
+ ;request_terminate_timeout = 0
+-
++
+ ; Set open file descriptor rlimit.
+ ; Default Value: system defined value
+ ;rlimit_files = 1024
+-
++
+ ; Set max core size rlimit.
+ ; Possible Values: 'unlimited' or an integer greater or equal to 0
+ ; Default Value: system defined value
+ ;rlimit_core = 0
+-
++
+ ; Chroot to this directory at the start. This value must be defined as an
+ ; absolute path. When this value is not set, chroot is not used.
+ ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
+ ; of its subdirectories. If the pool prefix is not set, the global prefix
+ ; will be used instead.
+-; Note: chrooting is a great security feature and should be used whenever
++; Note: chrooting is a great security feature and should be used whenever
+ ; possible. However, all PHP paths will be relative to the chroot
+ ; (error_log, sessions.save_path, ...).
+ ; Default Value: not set
+-;chroot =
+-
++;chroot =
++
+ ; Chdir to this directory at the start.
+ ; Note: relative path can be used.
+ ; Default Value: current directory or / when chroot
+ ;chdir = /var/www
+-
++
+ ; Redirect worker stdout and stderr into main error log. If not set, stdout and
+ ; stderr will be redirected to /dev/null according to FastCGI specs.
+ ; Note: on highloaded environement, this can cause some delay in the page
+@@ -493,7 +493,7 @@ pm.max_spare_servers = 3
+ ; Note: set an empty value to allow all extensions.
+ ; Default Value: .php
+ ;security.limit_extensions = .php .php3 .php4 .php5
+-
++
+ ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
+ ; the current environment.
+ ; Default Value: clean env
+@@ -507,7 +507,7 @@ pm.max_spare_servers = 3
+ ; overwrite the values previously defined in the php.ini. The directives are the
+ ; same as the PHP SAPI:
+ ; php_value/php_flag - you can set classic ini defines which can
+-; be overwritten from PHP call 'ini_set'.
++; be overwritten from PHP call 'ini_set'.
+ ; php_admin_value/php_admin_flag - these directives won't be overwritten by
+ ; PHP call 'ini_set'
+ ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
+--
+1.9.3
+
--- php5-fpm-ipv6.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list