mod_php_install.sh: fix error setting parameter opcache.error_log.

This commit is contained in:
Christoph 2023-06-23 16:28:20 +02:00
parent c7ea9f5ebb
commit cf88af8874

View File

@ -1283,6 +1283,11 @@ _key="opcache.error_log"
_default_val="${DEFAULT_OPCACHE_ERROR_LOG}"
if [ -f "/usr/local/php-${PHP_MAIN_VERSION}/etc/php.ini" ]; then
_OPCACHE_ERROR_LOG=$(grep -e "^\s*${_key}" /usr/local/php-${PHP_MAIN_VERSION}/etc/php.ini | awk '{print$3}')
# remove leading double quotes
_OPCACHE_ERROR_LOG="${_OPCACHE_ERROR_LOG#"${_OPCACHE_ERROR_LOG%%[!\"]*}"}"
# remove trailing double quotes
_OPCACHE_ERROR_LOG="${_OPCACHE_ERROR_LOG%"${_OPCACHE_ERROR_LOG##*[!\"]}"}"
fi
[[ -z "$_OPCACHE_ERROR_LOG" ]] && _OPCACHE_ERROR_LOG=$_default_val
@ -1315,7 +1320,7 @@ if [[ -n "$_OPCACHE_ERROR_LOG" ]] && ! $_foud; then
__higlighted=3
__number=5
elif ! $_found ; then
echo -e " [\033[1m3] other location"\033[m
echo -e " [\033[1m[3] other location"\033[m
echo -e " [4] \033[33m-- leave empty -\033[m"
__higlighted=3
else