Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/content/docs/2.image-variations/fpm-apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ For a complete list of available environment variables, see the [Environment Var
| `PHP_MEMORY_LIMIT` | `256M` | Maximum memory a script can use |
| `PHP_MAX_EXECUTION_TIME` | `99` | Maximum time a script can run (seconds) |
| `PHP_UPLOAD_MAX_FILE_SIZE` | `100M` | Maximum upload file size |
| `PHP_FILE_UPLOADS` | `On` | Whether HTTP file uploads are allowed |
| `PHP_MAX_FILE_UPLOADS` | `20` | Maximum number of files per request |
| `PHP_POST_MAX_SIZE` | `100M` | Maximum POST request size |

::tip{to="/docs/reference/environment-variable-specification"}
Expand Down
2 changes: 2 additions & 0 deletions docs/content/docs/2.image-variations/fpm-nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ For a complete list of available environment variables, see the [Environment Var
| `PHP_MEMORY_LIMIT` | `256M` | Maximum memory a script can use |
| `PHP_MAX_EXECUTION_TIME` | `99` | Maximum time a script can run (seconds) |
| `PHP_UPLOAD_MAX_FILE_SIZE` | `100M` | Maximum upload file size |
| `PHP_FILE_UPLOADS` | `On` | Whether HTTP file uploads are allowed |
| `PHP_MAX_FILE_UPLOADS` | `20` | Maximum number of files per request |
| `PHP_POST_MAX_SIZE` | `100M` | Maximum POST request size |

## Performance Tuning
Expand Down
2 changes: 2 additions & 0 deletions docs/content/docs/2.image-variations/frankenphp.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ For a complete list of available environment variables, see the [Environment Var
| `PHP_MEMORY_LIMIT` | `256M` | Maximum memory a script can use |
| `PHP_MAX_EXECUTION_TIME` | `99` | Maximum time a script can run (seconds) |
| `PHP_UPLOAD_MAX_FILE_SIZE` | `100M` | Maximum upload file size |
| `PHP_FILE_UPLOADS` | `On` | Whether HTTP file uploads are allowed |
| `PHP_MAX_FILE_UPLOADS` | `20` | Maximum number of files per request |
| `PHP_POST_MAX_SIZE` | `100M` | Maximum POST request size |
| `PHP_OPCACHE_ENABLE` | `0` | Enable OPcache (`0`/`1`) |
| `PHP_OPCACHE_REVALIDATE_FREQ` | `2` | How often to check for file changes (seconds) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Setting environment variables all depends on what method you're using to run you
`PHP_DISPLAY_STARTUP_ERRORS`<br />*Default: Off*|Even when display_errors is on, errors that occur during PHP's startup sequence are not displayed. (<a target="_blank" href="https://www.php.net/manual/en/errorfunc.configuration.php#ini.display-startup-errors">Official docs</a>)| all
`PHP_ERROR_LOG`<br />*Default: "/dev/stderr"*|Name of the file where script errors should be logged. . (<a target="_blank" href="https://www.php.net/manual/en/errorfunc.configuration.php#ini.error-log">Official docs</a>)|all
`PHP_ERROR_REPORTING`<br />*Default: "22527"*|Set PHP error reporting level. Must be a number. <a target="_blank" href="https://maximivanov.github.io/php-error-reporting-calculator/">Use this tool for help.</a> (<a target="_blank" href="https://www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting">Official docs</a>)|all
`PHP_FILE_UPLOADS`<br />*Default: "On"*|Whether to allow HTTP file uploads. (<a target="_blank" href="https://www.php.net/manual/en/ini.core.php#ini.file-uploads">Official docs</a>)|all
`PHP_FPM_CHILD_PROCESS_USER`<br />*Default: "www-data"*| ⚠️ Only used if container is running as root. Set the user of the PHP-FPM child processes. (<a target="_blank" href="https://www.php.net/manual/en/install.fpm.configuration.php">Official docs</a>)|fpm*
`PHP_FPM_CHILD_PROCESS_GROUP`<br />*Default: "www-data"*| ⚠️ Only used if container is running as root. Set the group of the PHP-FPM child processes. (<a target="_blank" href="https://www.php.net/manual/en/install.fpm.configuration.php">Official docs</a>)|fpm*
`PHP_FPM_PM_CONTROL`<br />*Defaults:<br />fpm: dynamic<br />fpm-apache: ondemand<br />fpm-nginx: ondemand*|Choose how the process manager will control the number of child processes. (<a target="_blank" href="https://www.php.net/manual/en/install.fpm.configuration.php">Official docs</a>)|fpm*
Expand All @@ -91,6 +92,7 @@ Setting environment variables all depends on what method you're using to run you
`PHP_FPM_POOL_NAME`<br />*Default: "www"*|Set the name of your PHP-FPM pool (helpful when running multiple sites on a single server).|fpm*
`PHP_FPM_PROCESS_CONTROL_TIMEOUT`<br />*Default: "10s"*|Set the timeout for the process control commands. (<a target="_blank" href="https://www.php.net/manual/en/install.fpm.configuration.php">Official docs</a>)|fpm*
`PHP_MAX_EXECUTION_TIME`<br />*Default: "99"*|Set the maximum time in seconds a script is allowed to run before it is terminated by the parser. (<a target="_blank" href="https://www.php.net/manual/en/info.configuration.php#ini.max-execution-time">Official docs</a>)|all
`PHP_MAX_FILE_UPLOADS`<br />*Default: "20"*|The maximum number of files allowed to be uploaded in a single request. (<a target="_blank" href="https://www.php.net/manual/en/ini.core.php#ini.max-file-uploads">Official docs</a>)|all
`PHP_MAX_INPUT_TIME`<br />*Default: "-1"*|This sets the maximum time in seconds a script is allowed to parse input data, like POST and GET. Timing begins at the moment PHP is invoked at the server and ends when execution begins. The default setting is -1, which means that max_execution_time is used instead. Set to 0 to allow unlimited time. This directive is hardcoded to -1 for the CLI SAPI by PHP. (<a target="_blank" href="https://php.net/max-input-time">Official docs</a>)|all
`PHP_MAX_INPUT_VARS`<br />*Default: "1000"*|Set the limits for number of input variables (e.g., POST, GET, or COOKIE variables) that PHP will process in a single request. (<a target="_blank" href="https://www.php.net/manual/en/info.configuration.php#ini.max-input-vars">Official docs</a>)|all
`PHP_MEMORY_LIMIT`<br />*Default: "256M"*|Set the maximum amount of memory in bytes that a script is allowed to allocate. (<a target="_blank" href="https://www.php.net/manual/en/ini.core.php#ini.memory-limit">Official docs</a>)|all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ enable_dl = Off

; Whether to allow HTTP file uploads.
; https://php.net/file-uploads
file_uploads = On
file_uploads = ${PHP_FILE_UPLOADS}

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
Expand All @@ -861,7 +861,7 @@ file_uploads = On
upload_max_filesize = ${PHP_UPLOAD_MAX_FILE_SIZE}

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20
max_file_uploads = ${PHP_MAX_FILE_UPLOADS}

;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
Expand Down
2 changes: 2 additions & 0 deletions src/variations/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ ENV APP_BASE_DIR=/var/www/html \
PHP_DISPLAY_STARTUP_ERRORS=Off \
PHP_ERROR_LOG="/dev/stderr" \
PHP_ERROR_REPORTING="22527" \
PHP_FILE_UPLOADS="On" \
PHP_MAX_EXECUTION_TIME="99" \
PHP_MAX_FILE_UPLOADS="20" \
PHP_MAX_INPUT_TIME="-1" \
PHP_MAX_INPUT_VARS="1000" \
PHP_MEMORY_LIMIT="256M" \
Expand Down
2 changes: 2 additions & 0 deletions src/variations/fpm-apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ ENV APACHE_DOCUMENT_ROOT=/var/www/html/public \
PHP_DISPLAY_STARTUP_ERRORS=Off \
PHP_ERROR_LOG="/dev/stderr" \
PHP_ERROR_REPORTING="22527" \
PHP_FILE_UPLOADS="On" \
PHP_FPM_PM_CONTROL=ondemand \
PHP_FPM_PM_MAX_CHILDREN="20" \
PHP_FPM_PM_MAX_REQUESTS="0" \
Expand All @@ -71,6 +72,7 @@ ENV APACHE_DOCUMENT_ROOT=/var/www/html/public \
PHP_FPM_POOL_NAME="www" \
PHP_FPM_PROCESS_CONTROL_TIMEOUT="10s" \
PHP_MAX_EXECUTION_TIME="99" \
PHP_MAX_FILE_UPLOADS="20" \
PHP_MAX_INPUT_TIME="-1" \
PHP_MAX_INPUT_VARS="1000" \
PHP_MEMORY_LIMIT="256M" \
Expand Down
2 changes: 2 additions & 0 deletions src/variations/fpm-nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ ENV APP_BASE_DIR=/var/www/html \
PHP_DISPLAY_STARTUP_ERRORS=Off \
PHP_ERROR_LOG="/dev/stderr" \
PHP_ERROR_REPORTING="22527" \
PHP_FILE_UPLOADS="On" \
PHP_FPM_PM_CONTROL=ondemand \
PHP_FPM_PM_MAX_CHILDREN="20" \
PHP_FPM_PM_MAX_REQUESTS="0" \
Expand All @@ -145,6 +146,7 @@ ENV APP_BASE_DIR=/var/www/html \
PHP_FPM_POOL_NAME="www" \
PHP_FPM_PROCESS_CONTROL_TIMEOUT="10s" \
PHP_MAX_EXECUTION_TIME="99" \
PHP_MAX_FILE_UPLOADS="20" \
PHP_MAX_INPUT_TIME="-1" \
PHP_MAX_INPUT_VARS="1000" \
PHP_MEMORY_LIMIT="256M" \
Expand Down
2 changes: 2 additions & 0 deletions src/variations/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ ENV APP_BASE_DIR=/var/www/html \
PHP_DISPLAY_STARTUP_ERRORS=Off \
PHP_ERROR_LOG="/dev/stderr" \
PHP_ERROR_REPORTING="22527" \
PHP_FILE_UPLOADS="On" \
PHP_FPM_PM_CONTROL=dynamic \
PHP_FPM_PM_MAX_CHILDREN="20" \
PHP_FPM_PM_MAX_REQUESTS="0" \
Expand All @@ -43,6 +44,7 @@ ENV APP_BASE_DIR=/var/www/html \
PHP_FPM_POOL_NAME="www" \
PHP_FPM_PROCESS_CONTROL_TIMEOUT="10s" \
PHP_MAX_EXECUTION_TIME="99" \
PHP_MAX_FILE_UPLOADS="20" \
PHP_MAX_INPUT_TIME="-1" \
PHP_MAX_INPUT_VARS="1000" \
PHP_MEMORY_LIMIT="256M" \
Expand Down
2 changes: 2 additions & 0 deletions src/variations/frankenphp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ LABEL org.opencontainers.image.title="serversideup/php (frankenphp)" \
PHP_DISPLAY_STARTUP_ERRORS=Off \
PHP_ERROR_LOG="/dev/stderr" \
PHP_ERROR_REPORTING="22527" \
PHP_FILE_UPLOADS="On" \
PHP_MAX_EXECUTION_TIME="99" \
PHP_MAX_FILE_UPLOADS="20" \
PHP_MAX_INPUT_TIME="-1" \
PHP_MAX_INPUT_VARS="1000" \
PHP_MEMORY_LIMIT="256M" \
Expand Down