Fix PHP error logging
This commit is contained in:
parent
0f6443b07e
commit
ac04d762af
2 changed files with 16 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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!"
|
||||
|
|
Loading…
Reference in a new issue