php-fpm: temporarily force debug mode
Some checks failed
php-fpm-build / build (7.4) (push) Failing after 39s
Some checks failed
php-fpm-build / build (7.4) (push) Failing after 39s
This commit is contained in:
@@ -97,8 +97,12 @@ RUN set -eux; \
|
|||||||
echo 'error_log = /proc/self/fd/2'; \
|
echo 'error_log = /proc/self/fd/2'; \
|
||||||
} > /usr/local/etc/php/conf.d/zz-hardening.ini
|
} > /usr/local/etc/php/conf.d/zz-hardening.ini
|
||||||
|
|
||||||
|
# Copy the force-debug script and enable it
|
||||||
|
COPY --chown=app:app shared/php-fpm/force-debug.php /usr/local/etc/php/force-debug.php
|
||||||
|
RUN echo 'auto_prepend_file = /usr/local/etc/php/force-debug.php' > /usr/local/etc/php/conf.d/zz-force-debug.ini
|
||||||
|
|
||||||
# Copy pool configuration from this directory
|
# Copy pool configuration from this directory
|
||||||
COPY --chown=app:app php-fpm/${BASE_VERSION}/www.conf /usr/local/etc/php-fpm.d/www.conf
|
COPY --chown=app:app www.conf /usr/local/etc/php-fpm.d/www.conf
|
||||||
|
|
||||||
# Copy entrypoint from shared path in repo root
|
# Copy entrypoint from shared path in repo root
|
||||||
COPY --chown=root:root shared/php-fpm/entrypoint.sh /usr/local/bin/entrypoint.sh
|
COPY --chown=root:root shared/php-fpm/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||||
|
|||||||
14
shared/php-fpm/force-debug.php
Normal file
14
shared/php-fpm/force-debug.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
// force-debug.php
|
||||||
|
// This script is prepended to all PHP requests to force error reporting.
|
||||||
|
|
||||||
|
// Set error reporting to the highest level.
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
|
||||||
|
// Ensure errors are displayed directly in the browser.
|
||||||
|
// This overrides any ini_set('display_errors', 'Off') in the application.
|
||||||
|
ini_set('display_errors', '1');
|
||||||
|
|
||||||
|
// Also ensure errors are logged.
|
||||||
|
ini_set('log_errors', '1');
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user