Skip to content

Commit

Permalink
Add env vars for disable_functions and disable_classes, closes #195
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed May 6, 2024
1 parent 7d754ee commit 751b43b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions 8/templates/docker-php-8.1.ini.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ allow_url_fopen = {{ getenv "PHP_ALLOW_URL_FOPEN" "On" }}
default_socket_timeout = {{ getenv "PHP_DEFAULT_SOCKET_TIMEOUT" "60" }}
output_buffering = {{ getenv "PHP_OUTPUT_BUFFERING" "4096" }}
short_open_tag = {{ getenv "PHP_SHORT_OPEN_TAG" "1" }}
disable_functions = {{ getenv "PHP_DISABLE_FUNCTIONS" }}
disable_classes = {{ getenv "PHP_DISABLE_CLASSES" }}

realpath_cache_size = {{ getenv "PHP_REALPATH_CACHE_SIZE" "4096k" }}
realpath_cache_ttl = {{ getenv "PHP_REALPATH_CACHE_TTL" "120" }}
Expand Down
2 changes: 2 additions & 0 deletions 8/templates/docker-php-8.2.ini.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ allow_url_fopen = {{ getenv "PHP_ALLOW_URL_FOPEN" "On" }}
default_socket_timeout = {{ getenv "PHP_DEFAULT_SOCKET_TIMEOUT" "60" }}
output_buffering = {{ getenv "PHP_OUTPUT_BUFFERING" "4096" }}
short_open_tag = {{ getenv "PHP_SHORT_OPEN_TAG" "1" }}
disable_functions = {{ getenv "PHP_DISABLE_FUNCTIONS" }}
disable_classes = {{ getenv "PHP_DISABLE_CLASSES" }}

realpath_cache_size = {{ getenv "PHP_REALPATH_CACHE_SIZE" "4096k" }}
realpath_cache_ttl = {{ getenv "PHP_REALPATH_CACHE_TTL" "120" }}
Expand Down
2 changes: 2 additions & 0 deletions 8/templates/docker-php-8.3.ini.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ allow_url_fopen = {{ getenv "PHP_ALLOW_URL_FOPEN" "On" }}
default_socket_timeout = {{ getenv "PHP_DEFAULT_SOCKET_TIMEOUT" "60" }}
output_buffering = {{ getenv "PHP_OUTPUT_BUFFERING" "4096" }}
short_open_tag = {{ getenv "PHP_SHORT_OPEN_TAG" "1" }}
disable_functions = {{ getenv "PHP_DISABLE_FUNCTIONS" }}
disable_classes = {{ getenv "PHP_DISABLE_CLASSES" }}

realpath_cache_size = {{ getenv "PHP_REALPATH_CACHE_SIZE" "4096k" }}
realpath_cache_ttl = {{ getenv "PHP_REALPATH_CACHE_TTL" "120" }}
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ The default configuration not recommended for use for production environment:
| `PHP_CLI_MEMORY_LIMIT` | `-1` | `-1` | `-1` |
| [`PHP_DATE_TIMEZONE`] | `UTC` | `UTC` | `UTC` |
| [`PHP_DEFAULT_SOCKET_TIMEOUT`] | `60` | `60` | `60` |
| [`PHP_DISPLAY_ERRORS`] | `On` | `On` | `On` |
| [`PHP_DISABLE_FUNCTIONS`] | | | |
| [`PHP_DISABLE_CLASSES`] | | | |
| [`PHP_DISPLAY_STARTUP_ERRORS`] | `On` | `On` | `On` |
| [`PHP_ERROR_REPORTING`] | `E_ALL` | `E_ALL` | `E_ALL` |
| [`PHP_EXPOSE`] | `Off` | `Off` | `Off` |
Expand Down Expand Up @@ -452,6 +453,10 @@ default params values:

[`PHP_DISPLAY_ERRORS`]: http://php.net/display-errors

[`PHP_DISABLE_FUNCTIONS`]: https://www.php.net/manual/en/ini.core.php#ini.disable-functions

[`PHP_DISABLE_CLASSES`]: https://www.php.net/manual/en/ini.core.php#ini.disable-classes

[`PHP_DISPLAY_STARTUP_ERRORS`]: http://php.net/display-startup-errors

[`PHP_ERROR_REPORTING`]: http://php.net/error-reporting
Expand Down

0 comments on commit 751b43b

Please sign in to comment.