diff --git a/ehcp/ehcpforceupdate.sh b/ehcp/ehcpforceupdate.sh index 70c9181..8334de5 100755 --- a/ehcp/ehcpforceupdate.sh +++ b/ehcp/ehcpforceupdate.sh @@ -2017,6 +2017,14 @@ function ModifyPHPIniConfigForFile(){ sed -i "s#^opcache.enable=.*#opcache.enable=0#g" "$PHPINIFILE" fi fi + + # Fix PHP error logging + hasPHPErrLogging=$(cat "$PHPINIFILE" | grep -o "^error_log.*") + if [ -z "$hasPHPErrLogging" ]; then + echo "error_log=/var/log/php_errors.log" >> "$PHPINIFILE" + else + sed -i "s#^error_log.*#error_log=/var/log/php_errors.log#g" "$PHPINIFILE" + fi fi fi } diff --git a/ehcp/install_main.sh b/ehcp/install_main.sh index b1b3212..223b73c 100755 --- a/ehcp/install_main.sh +++ b/ehcp/install_main.sh @@ -1825,6 +1825,14 @@ function ModifyPHPIniConfigForFile(){ sed -i "s#^opcache.enable=.*#opcache.enable=0#g" "$PHPINIFILE" fi fi + + # Fix PHP error logging + hasPHPErrLogging=$(cat "$PHPINIFILE" | grep -o "^error_log.*") + if [ -z "$hasPHPErrLogging" ]; then + echo "error_log=/var/log/php_errors.log" >> "$PHPINIFILE" + else + sed -i "s#^error_log.*#error_log=/var/log/php_errors.log#g" "$PHPINIFILE" + fi else # Logging logToInstallLogFile "$PHPINIFILE does not exist!"