From f8ea051f99b0e40437cd08e671994c8f978740b1 Mon Sep 17 00:00:00 2001 From: paul Date: Sat, 25 Sep 2021 03:24:51 +0200 Subject: [PATCH] Enable production PHP settings --- Dockerfile | 3 +++ conf/LocalSettings.php | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 7e82a9d..878d1a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -88,3 +88,6 @@ RUN chmod 755 /usr/local/bin/* # Add crontab file in the cron directory ADD crontab /etc/crontab RUN chmod 0644 /etc/crontab + +# Enable production config +RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini diff --git a/conf/LocalSettings.php b/conf/LocalSettings.php index f6a0646..0b0c42d 100644 --- a/conf/LocalSettings.php +++ b/conf/LocalSettings.php @@ -156,11 +156,15 @@ enableSemantics( getenv("SEMANTIC_URL") ); # Set Subpages on $wgNamespacesWithSubpages[NS_MAIN] = 1; +ini_set('display_errors', '0'); +ini_set('display_startup_errors', '0'); # Enable long error messages if (getenv("DEBUG")) { $wgShowExceptionDetails = true; $wgShowDBErrorBacktrace = true; $wgShowSQLErrors = true; + ini_set("display_errors", 1); + ini_set('display_startup_errors', '1'); } # Local configuration for MediaWiki