fix error installing imap pecl plugin.

This commit is contained in:
2025-12-24 01:57:08 +01:00
parent cbbcdf429c
commit b854d10517

View File

@@ -6949,33 +6949,46 @@ echononl "\tInstall 'imap' via pecl.."
if ([[ "$PHP_MAJOR_VERSION" -eq 8 ]] && [[ "$PHP_MINOR_VERSION" -ge 4 ]]) \ if ([[ "$PHP_MAJOR_VERSION" -eq 8 ]] && [[ "$PHP_MINOR_VERSION" -ge 4 ]]) \
|| [[ "$PHP_MAJOR_VERSION" -gt 8 ]] \ || [[ "$PHP_MAJOR_VERSION" -gt 8 ]] \
|| [[ "$os_dist" = "debian" ]] && [[ "$os_version" -ge 13 ]] ; then || ([[ "$os_dist" = "debian" ]] && [[ "$os_version" -ge 13 ]]) ; then
printf "\n" | ${PREFIX_PHP}/bin/pecl install imap >> "${_logdir}/pecl_install.log" 2>&1
if [ "$?" = "0" ]; then
echo_ok
echononl "\tphp.ini: extension=imap .." if ( dpkg -s libc-client-dev > /dev/null 2>&1 \
_extension="imap.so" || dpkg -s libc-client2007e-dev > /dev/null 2>&1 \
perl -i -n -p -e "s#^(\s*\[PHP\]\s*)#\1\nextension=${_extension}\n#" $PHP_INI_FILE || dpkg -s uw-imap-dev >/dev/null 2>&1; ) \
|| [[ -f /usr/local/imap/lib/libc-client.a ]] ; then
printf "\n" | ${PREFIX_PHP}/bin/pecl install imap >> "${_logdir}/pecl_install.log" 2>&1
if [ "$?" = "0" ]; then if [ "$?" = "0" ]; then
echo_ok echo_ok
echononl "\tphp.ini: extension=imap .."
_extension="imap.so"
perl -i -n -p -e "s#^(\s*\[PHP\]\s*)#\1\nextension=${_extension}\n#" $PHP_INI_FILE
if [ "$?" = "0" ]; then
echo_ok
else
echo_failed
fi
else else
echo_failed echo_failed
echo ""
echononl "continue anyway [yes/no]: "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/nno]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
echo ""
fi fi
else else
echo_failed
echo "" echo_skipped
echononl "continue anyway [yes/no]: " warn "The imap plugin cannot be installed - no imap library was found. "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/nno]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
echo ""
fi fi
else else