Skip to content

Commit

Permalink
Merge #324 - Add expose_php env back
Browse files Browse the repository at this point in the history
It was broken in #320 implementation
  • Loading branch information
williamdes committed Feb 7, 2021
2 parents bd7de17 + d383a98 commit e09f731
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 10 deletions.
3 changes: 1 addition & 2 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ RUN set -ex; \

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
ENV MAX_EXECUTION_TIME 600
ENV MEMORY_LIMIT 512M
ENV UPLOAD_LIMIT 2048K
ENV MAX_EXECUTION_TIME 600
RUN set -ex; \
\
{ \
Expand All @@ -58,7 +58,6 @@ RUN set -ex; \
\
{ \
echo 'allow_url_fopen=Off'; \
echo 'expose_php=Off'; \
echo 'max_execution_time=${MAX_EXECUTION_TIME}'; \
echo 'max_input_vars=10000'; \
echo 'memory_limit=${MEMORY_LIMIT}'; \
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ RUN set -ex; \

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
ENV MAX_EXECUTION_TIME 600
ENV MEMORY_LIMIT 512M
ENV UPLOAD_LIMIT 2048K
ENV MAX_EXECUTION_TIME 600
RUN set -ex; \
\
{ \
Expand All @@ -60,7 +60,6 @@ RUN set -ex; \
\
{ \
echo 'allow_url_fopen=Off'; \
echo 'expose_php=Off'; \
echo 'max_execution_time=${MAX_EXECUTION_TIME}'; \
echo 'max_input_vars=10000'; \
echo 'memory_limit=${MEMORY_LIMIT}'; \
Expand Down
3 changes: 1 addition & 2 deletions apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ RUN set -ex; \

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
ENV MAX_EXECUTION_TIME 600
ENV MEMORY_LIMIT 512M
ENV UPLOAD_LIMIT 2048K
ENV MAX_EXECUTION_TIME 600
RUN set -ex; \
\
{ \
Expand All @@ -60,7 +60,6 @@ RUN set -ex; \
\
{ \
echo 'allow_url_fopen=Off'; \
echo 'expose_php=Off'; \
echo 'max_execution_time=${MAX_EXECUTION_TIME}'; \
echo 'max_input_vars=10000'; \
echo 'memory_limit=${MEMORY_LIMIT}'; \
Expand Down
5 changes: 5 additions & 0 deletions apache/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ EOT
fi
fi

if [ ! -z "${HIDE_PHP_VERSION}" ]; then
echo "PHP version is now hidden."
echo -e 'expose_php = Off\n' > $PHP_INI_DIR/conf.d/phpmyadmin-hide-php-version.ini
fi

if [ ! -z "${PMA_CONFIG_BASE64}" ]; then
echo "Adding the custom config.inc.php from base64."
echo "${PMA_CONFIG_BASE64}" | base64 -d > /etc/phpmyadmin/config.inc.php
Expand Down
5 changes: 5 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ EOT
fi
fi

if [ ! -z "${HIDE_PHP_VERSION}" ]; then
echo "PHP version is now hidden."
echo -e 'expose_php = Off\n' > $PHP_INI_DIR/conf.d/phpmyadmin-hide-php-version.ini
fi

if [ ! -z "${PMA_CONFIG_BASE64}" ]; then
echo "Adding the custom config.inc.php from base64."
echo "${PMA_CONFIG_BASE64}" | base64 -d > /etc/phpmyadmin/config.inc.php
Expand Down
3 changes: 1 addition & 2 deletions fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ RUN set -ex; \

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
ENV MAX_EXECUTION_TIME 600
ENV MEMORY_LIMIT 512M
ENV UPLOAD_LIMIT 2048K
ENV MAX_EXECUTION_TIME 600
RUN set -ex; \
\
{ \
Expand All @@ -58,7 +58,6 @@ RUN set -ex; \
\
{ \
echo 'allow_url_fopen=Off'; \
echo 'expose_php=Off'; \
echo 'max_execution_time=${MAX_EXECUTION_TIME}'; \
echo 'max_input_vars=10000'; \
echo 'memory_limit=${MEMORY_LIMIT}'; \
Expand Down
5 changes: 5 additions & 0 deletions fpm-alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ EOT
fi
fi

if [ ! -z "${HIDE_PHP_VERSION}" ]; then
echo "PHP version is now hidden."
echo -e 'expose_php = Off\n' > $PHP_INI_DIR/conf.d/phpmyadmin-hide-php-version.ini
fi

if [ ! -z "${PMA_CONFIG_BASE64}" ]; then
echo "Adding the custom config.inc.php from base64."
echo "${PMA_CONFIG_BASE64}" | base64 -d > /etc/phpmyadmin/config.inc.php
Expand Down
3 changes: 1 addition & 2 deletions fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ RUN set -ex; \

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
ENV MAX_EXECUTION_TIME 600
ENV MEMORY_LIMIT 512M
ENV UPLOAD_LIMIT 2048K
ENV MAX_EXECUTION_TIME 600
RUN set -ex; \
\
{ \
Expand All @@ -60,7 +60,6 @@ RUN set -ex; \
\
{ \
echo 'allow_url_fopen=Off'; \
echo 'expose_php=Off'; \
echo 'max_execution_time=${MAX_EXECUTION_TIME}'; \
echo 'max_input_vars=10000'; \
echo 'memory_limit=${MEMORY_LIMIT}'; \
Expand Down
5 changes: 5 additions & 0 deletions fpm/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ EOT
fi
fi

if [ ! -z "${HIDE_PHP_VERSION}" ]; then
echo "PHP version is now hidden."
echo -e 'expose_php = Off\n' > $PHP_INI_DIR/conf.d/phpmyadmin-hide-php-version.ini
fi

if [ ! -z "${PMA_CONFIG_BASE64}" ]; then
echo "Adding the custom config.inc.php from base64."
echo "${PMA_CONFIG_BASE64}" | base64 -d > /etc/phpmyadmin/config.inc.php
Expand Down

0 comments on commit e09f731

Please sign in to comment.