Added alternative php. Part 8

This commit is contained in:
Alexey Berezhok
2025-01-22 23:10:51 +03:00
parent b29a369515
commit c25c8d8f64
17 changed files with 181 additions and 67 deletions

View File

@@ -1298,9 +1298,6 @@ rm -f $HESTIA/data/firewall/ipset/blacklist.sh $HESTIA/data/firewall/ipset/black
# Installing apis
cp -rf $HESTIA_COMMON_DIR/api $HESTIA/data/
# Set system php for selector
hestiacp-php-admin system "$php_v"
# Configuring server hostname
$HESTIA/bin/v-change-sys-hostname $servername > /dev/null 2>&1
@@ -1509,14 +1506,24 @@ fi
#----------------------------------------------------------#
echo "[ * ] Configuring PHP..."
# Set system php for selector
hestiacp-php-admin system "$php_v"
ZONE=$(timedatectl > /dev/null 2>&1 | grep Timezone | awk '{print $2}')
if [ -z "$ZONE" ]; then
ZONE='UTC'
fi
for pconf in $(find /etc/opt/remi/php* -name php.ini); do
sed -i "s%;date.timezone =%date.timezone = $ZONE%g" $pconf
sed -i 's%_open_tag = Off%_open_tag = On%g' $pconf
done
if [ "$uselocalphp" == "yes" ]; then
for pconf in $(find /opt/brepo/php* -name php.ini); do
sed -i "s%;date.timezone =%date.timezone = $ZONE%g" $pconf
sed -i 's%_open_tag = Off%_open_tag = On%g' $pconf
done
else
for pconf in $(find /etc/opt/remi/php* -name php.ini); do
sed -i "s%;date.timezone =%date.timezone = $ZONE%g" $pconf
sed -i 's%_open_tag = Off%_open_tag = On%g' $pconf
done
fi
# Cleanup php session files not changed in the last 7 days (60*24*7 minutes)
echo '#!/bin/sh' > /etc/cron.daily/php-session-cleanup

View File

@@ -35,7 +35,7 @@ UPGRADE_RESTART_SERVICES='true'
#######################################################################################
# Supported PHP versions
multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1" "8.2")
multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1" "8.2", "8.3")
#######################################################################################
####### 3rd Party Software Updates #######