From 86b1480128c9ecc8e42e27b3295a07a69c0879d0 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 1 Nov 2024 09:18:41 +0700 Subject: [PATCH 1/2] chore: only display errors in debug mode, otherwise log to stderr Fixes: #457 --- .gitignore | 3 +++ .htaccess | 13 ++++++++++++- .user.ini | 3 --- applicationHost.xdt | 15 --------------- build.sh | 2 +- 5 files changed, 16 insertions(+), 20 deletions(-) delete mode 100644 .user.ini delete mode 100644 applicationHost.xdt diff --git a/.gitignore b/.gitignore index 1658575f..7da54e4a 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ vendor* resources/bootstrap.inc.sh resources/.bootstrap-version _common/ + +# State files +_control/debug diff --git a/.htaccess b/.htaccess index b1098e15..1342041a 100644 --- a/.htaccess +++ b/.htaccess @@ -1,6 +1,15 @@ # This file is used when running with Apache. Adapted from web.config. # NOTE: this is not very well tested... +php_value display_errors off +php_value display_startup_errors off +php_value include_path ".:/var/www/html/_includes/" + + + php_value display_startup_errors on + php_value display_errors stderr + + # We turn off automatic addition of slashes for directories because it # interferes with the file extension removal for .php files. At the bottom of # this file, we have a redirect rule to mimic the same behaviour, _after_ the @@ -112,7 +121,7 @@ RewriteRule "^keyboards/countries/(.*)" "/keyboards/index.php?q=c:id:$1" [END] # Synonym paths -# 10.0 to 15.0 +# 10.0 to 15.0 # /1X.0 to /1X landing page RedirectMatch "^/1([0-5])(\.0)\/?" "/1$1/" @@ -207,3 +216,5 @@ RewriteRule "^(.+)/$" "$1/index.php" [END] # done automatically because we put DirectorySlash off RewriteCond %{REQUEST_FILENAME} -d RewriteRule "^(.*)([^/])$" "$1$2/" [R] + + diff --git a/.user.ini b/.user.ini deleted file mode 100644 index c8c4e0b2..00000000 --- a/.user.ini +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/applicationHost.xdt b/applicationHost.xdt deleted file mode 100644 index 359fa38c..00000000 --- a/applicationHost.xdt +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build.sh b/build.sh index 0ce62859..14c119ae 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ ## START STANDARD SITE BUILD SCRIPT INCLUDE readonly THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" readonly BOOTSTRAP="$(dirname "$THIS_SCRIPT")/resources/bootstrap.inc.sh" -readonly BOOTSTRAP_VERSION=v0.10 +readonly BOOTSTRAP_VERSION=chore/v0.11 [ -f "$BOOTSTRAP" ] && source "$BOOTSTRAP" || source <(curl -fs https://raw.githubusercontent.com/keymanapp/shared-sites/$BOOTSTRAP_VERSION/bootstrap.inc.sh) ## END STANDARD SITE BUILD SCRIPT INCLUDE From b131559245d7e0ccab7414a7df5ef6c70d1a1b24 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 1 Nov 2024 07:59:12 +0100 Subject: [PATCH 2/2] chore: Update build.sh to v0.11 --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 14c119ae..ba06abcf 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ ## START STANDARD SITE BUILD SCRIPT INCLUDE readonly THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" readonly BOOTSTRAP="$(dirname "$THIS_SCRIPT")/resources/bootstrap.inc.sh" -readonly BOOTSTRAP_VERSION=chore/v0.11 +readonly BOOTSTRAP_VERSION=v0.11 [ -f "$BOOTSTRAP" ] && source "$BOOTSTRAP" || source <(curl -fs https://raw.githubusercontent.com/keymanapp/shared-sites/$BOOTSTRAP_VERSION/bootstrap.inc.sh) ## END STANDARD SITE BUILD SCRIPT INCLUDE