diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f62b0e..02d94af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.0.1 2022-07-03 + + ### Added + - Add PHP_FPM_OUTPUT_BUFFER_SIZE environment variable + + ## 7.0.0 2022-06-23 ### Added diff --git a/README.md b/README.md index 0350231..0fc33a8 100644 --- a/README.md +++ b/README.md @@ -81,8 +81,8 @@ The following image tags are available along with their tagged release based on | PHP version | Alpine Base | Tag | Debian Base | Tag | | ----------- | ----------- | -------------- | ----------- | ------------- | | latest | edge | `:alpine-edge` | | | -| 8.1.x | edge | `:alpine-8.1` | Buster | `:debian-8.1` | -| 8.0.x | 3.15 | `:alpine-8.0` | Buster | `:debian-8.0` | +| 8.1.x | 3.16 | `:alpine-8.1` | Buster | `:debian-8.1` | +| 8.0.x | 3.16 | `:alpine-8.0` | Buster | `:debian-8.0` | | 7.4.x | 3.15 | `:alpine-7.4` | Buster | `:debian-7.3` | | 7.3.x | 3.12 | `:alpine-7.3` | Buster | `:debian-7.3` | | 7.2.x | 3.9 | `:alpine-7.2` | | | @@ -143,31 +143,32 @@ When `PHP_FPM_CONTAINER_MODE` set to `nginx` the `PHP_FPM_LISTEN_PORT` environme *You can also pass arguments to each server as defined in the [Nginx Upstream Documentation](https://nginx.org/en/docs/http/ngx_http_upstream_module.html)* -| Parameter | Description | Default | -| --------------------------- | -------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | -| `PHP_APC_SHM_SIZE` | APC Cache Memory size - `0` to disable | `128M` | -| `PHP_FPM_HOST` | Default PHP-FPM Host, seperate multiple by commas | `127.0.0.1:9000` - See above Container options | -| `PHP_FPM_LISTEN_PORT` | PHP-FPM Listening Port - Ignored with above container options | `9000` | -| `PHP_FPM_MAX_CHILDREN` | Maximum Children | `75` | -| `PHP_FPM_MAX_REQUESTS` | How many requests before spawning new server | `500` | -| `PHP_FPM_MAX_SPARE_SERVERS` | Maximum Spare Servers available | `3` | -| `PHP_FPM_MIN_SPARE_SERVERS` | Minium Spare Servers avaialble | `1` | -| `PHP_FPM_POST_INIT_COMMAND` | If you wish to execute a command before php-fpm executes, enter it here and seperate multiples by comma. | | -| `PHP_FPM_POST_INIT_SCRIPT` | If you wish to execute a script before php-fpm executes, enter it here and seperate multiples by comma. | | -| `PHP_FPM_PROCESS_MANAGER` | How to handle processes `static`, `ondemand`, `dynamic` | `dynamic` | -| `PHP_FPM_START_SERVERS` | How many FPM servers to start initially | `2` | -| `PHP_LOG_ACCESS_FILE` | PHP Access Logfile Name | `access.log` | -| `PHP_LOG_ERROR_FILE` | Logfile name | `error.log` | -| `PHP_LOG_LEVEL` | PHP Log Level `alert` `error` `warning` `notice` `debug` | `notice` | -| `PHP_LOG_ACCESS_FORMAT` | Log format - `default` or `json` | `default` | -| `PHP_LOG_LIMIT` | Characters to log | `2048` | -| `PHP_LOG_LOCATION` | Log Location for PHP Logs | `/www/logs/php-fpm` | -| `PHP_MEMORY_LIMIT` | How much memory should PHP use | `128M` | -| `PHP_OPCACHE_MEM_SIZE` | OPCache Memory Size - Set `0` to disable or via other env vars | `128` | -| `PHP_POST_MAX_SIZE` | Maximum Input Size for POST | `2G` | -| `PHP_TIMEOUT` | Maximum Script execution Time | `180` | -| `PHP_UPLOAD_MAX_SIZE` | Maximum Input Size for Uploads | `2G` | -| `PHP_WEBROOT` | Used with `CONTAINER_MODE=php-fpm` | `/www/html` | +| Parameter | Description | Default | +| ---------------------------- | -------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | +| `PHP_APC_SHM_SIZE` | APC Cache Memory size - `0` to disable | `128M` | +| `PHP_FPM_HOST` | Default PHP-FPM Host, seperate multiple by commas | `127.0.0.1:9000` - See above Container options | +| `PHP_FPM_LISTEN_PORT` | PHP-FPM Listening Port - Ignored with above container options | `9000` | +| `PHP_FPM_MAX_CHILDREN` | Maximum Children | `75` | +| `PHP_FPM_MAX_REQUESTS` | How many requests before spawning new server | `500` | +| `PHP_FPM_MAX_SPARE_SERVERS` | Maximum Spare Servers available | `3` | +| `PHP_FPM_MIN_SPARE_SERVERS` | Minium Spare Servers avaialble | `1` | +| `PHP_FPM_OUTPUT_BUFFER_SIZE` | Output buffer size in bytes | `0` | +| `PHP_FPM_POST_INIT_COMMAND` | If you wish to execute a command before php-fpm executes, enter it here and seperate multiples by comma. | | +| `PHP_FPM_POST_INIT_SCRIPT` | If you wish to execute a script before php-fpm executes, enter it here and seperate multiples by comma. | | +| `PHP_FPM_PROCESS_MANAGER` | How to handle processes `static`, `ondemand`, `dynamic` | `dynamic` | +| `PHP_FPM_START_SERVERS` | How many FPM servers to start initially | `2` | +| `PHP_LOG_ACCESS_FILE` | PHP Access Logfile Name | `access.log` | +| `PHP_LOG_ERROR_FILE` | Logfile name | `error.log` | +| `PHP_LOG_LEVEL` | PHP Log Level `alert` `error` `warning` `notice` `debug` | `notice` | +| `PHP_LOG_ACCESS_FORMAT` | Log format - `default` or `json` | `default` | +| `PHP_LOG_LIMIT` | Characters to log | `2048` | +| `PHP_LOG_LOCATION` | Log Location for PHP Logs | `/www/logs/php-fpm` | +| `PHP_MEMORY_LIMIT` | How much memory should PHP use | `128M` | +| `PHP_OPCACHE_MEM_SIZE` | OPCache Memory Size - Set `0` to disable or via other env vars | `128` | +| `PHP_POST_MAX_SIZE` | Maximum Input Size for POST | `2G` | +| `PHP_TIMEOUT` | Maximum Script execution Time | `180` | +| `PHP_UPLOAD_MAX_SIZE` | Maximum Input Size for Uploads | `2G` | +| `PHP_WEBROOT` | Used with `CONTAINER_MODE=php-fpm` | `/www/html` | #### Enabling / Disabling Specific Extensions diff --git a/install/assets/defaults/20-php-fpm b/install/assets/defaults/20-php-fpm index 2ba2b3c..7632c87 100755 --- a/install/assets/defaults/20-php-fpm +++ b/install/assets/defaults/20-php-fpm @@ -13,6 +13,7 @@ PHP_FPM_MAX_CHILDREN=${PHP_FPM_MAX_CHILDREN:-"75"} PHP_FPM_MAX_REQUESTS=${PHP_FPM_MAX_REQUESTS:-"500"} PHP_FPM_MAX_SPARE_SERVERS=${PHP_FPM_MAX_SPARE_SERVERS:-"3"} PHP_FPM_MIN_SPARE_SERVERS=${PHP_FPM_MIN_SPARE_SERVERS:-"1"} +PHP_FPM_OUTPUT_BUFFER_SIZE=${PHP_FPM_OUTPUT_BUFFER_SIZE:-"0"} PHP_FPM_PROCESS_MANAGER=${PHP_FPM_PROCESS_MANAGER:-"dynamic"} PHP_FPM_START_SERVERS=${PHP_FPM_START_SERVERS:-"2"} PHP_LOG_ACCESS_FILE=${PHP_LOG_ACCESS_FILE:-"access.log"} diff --git a/install/assets/functions/20-php-fpm b/install/assets/functions/20-php-fpm index ef5c455..2c9d102 100755 --- a/install/assets/functions/20-php-fpm +++ b/install/assets/functions/20-php-fpm @@ -195,6 +195,7 @@ phpfpm_configure_server() { sed -i -e "s##${PHP_FPM_MAX_SPARE_SERVERS}#g" /assets/php-fpm/fpm/php-fpm.conf sed -i -e "s##${PHP_FPM_START_SERVERS}#g" /assets/php-fpm/fpm/php-fpm.conf sed -i -e "s##${PHP_FPM_MIN_SPARE_SERVERS}#g" /assets/php-fpm/fpm/php-fpm.conf + sed -i -e "s##${PHP_FPM_OUTPUT_BUFFER_SIZE}#g" /assets/php-fpm/fpm/php-fpm.conf sed -i -e "s##${PHP_FPM_HOST}#g" /etc/nginx/snippets/php-fpm.conf sed -i -e "s##${PHP_FPM_LISTEN_PORT}#g" /etc/nginx/snippets/php-fpm.conf sed -i -e "s##${PHP_LOG_LOCATION}#g" /assets/php-fpm/fpm/php-fpm.conf diff --git a/install/assets/php-fpm/fpm/php-fpm.conf b/install/assets/php-fpm/fpm/php-fpm.conf index 639a75d..bb55143 100644 --- a/install/assets/php-fpm/fpm/php-fpm.conf +++ b/install/assets/php-fpm/fpm/php-fpm.conf @@ -26,7 +26,7 @@ php_admin_value[max_input_vars] = 10000 php_admin_value[memory_limit] = php_admin_value[openssl.cafile] = /etc/ssl/certs/ca-certificates.crt php_admin_value[openssl.capath] = /etc/ssl/certs -php_admin_value[output_buffering] = 0 +php_admin_value[output_buffering] = php_admin_value[post_max_size] = php_admin_value[upload_max_filesize] = php_flag[display_errors] = on