Skip to content

Commit 5280de8

Browse files
committed
testing
Final testing and PHP 8.5 support added.
1 parent 1c44845 commit 5280de8

File tree

6 files changed

+34
-17
lines changed

6 files changed

+34
-17
lines changed

lib/general

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
readonly app_version="1.19.7"
88
readonly svr_version="1.11"
99
readonly os_ubuntu_supported=(focal jammy noble) # https://ubuntu.com/about/release-cycle
10-
readonly php_supported=(7.4 8.0 8.1 8.2 8.3 8.4) # https://www.php.net/supported-versions.php
10+
readonly php_supported=(7.4 8.0 8.1 8.2 8.3 8.4 8.5) # https://www.php.net/supported-versions.php
1111
readonly php_default="8.4"
1212
readonly mariadb_supported=(10.11 11.4 11.8) # https://mariadb.com/docs/release-notes/community-server
1313
readonly mariadb_default="11.8"

lib/install

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,11 @@ php_install() {
211211
fi
212212
local ver=$(conf_read php-ver)
213213

214-
sudo apt -y install php${ver}-common php${ver}-cli php${ver}-fpm php${ver}-curl php${ver}-gd php${ver}-imap php${ver}-readline php${ver}-mysql php${ver}-mbstring php${ver}-bcmath php${ver}-opcache php${ver}-zip php${ver}-xml php${ver}-soap php${ver}-imagick php${ver}-msgpack php${ver}-igbinary php${ver}-intl php-pear graphviz ghostscript
214+
sudo apt -y install php${ver}-common php${ver}-cli php${ver}-fpm php${ver}-curl php${ver}-gd php${ver}-imap php${ver}-readline php${ver}-mysql php${ver}-mbstring php${ver}-bcmath php${ver}-zip php${ver}-xml php${ver}-soap php${ver}-imagick php${ver}-msgpack php${ver}-igbinary php${ver}-intl php-pear graphviz ghostscript
215215

216+
# Starting with 8.5: Opcache extension is now always bundled in core, cannot be installed separately.
217+
[[ $ver =~ ^(5.6|7.0|7.1|7.2|7.3|7.4|8.0|8.1|8.2|8.3|8.4)$ ]] && sudo apt -y install php${ver}-opcache
218+
216219
conf_write php true
217220

218221
if [[ -d /etc/php/${ver}/fpm ]] && systemctl is-active --quiet php${ver}-fpm; then
@@ -430,13 +433,13 @@ fastcgi_param HTTP_ACCEPT_ENCODING "";
430433
[[ -n $(conf_read default-response) ]] && sudo webinoly -default-site=$(conf_read default-response)
431434
[[ -n $(conf_read tools-port-set) ]] && sudo webinoly -tools-port=$(conf_read tools-port-set)
432435
[[ -n $(conf_read tools-site) ]] && sudo webinoly -tools-site=$(conf_read tools-site)
433-
[[ $(conf_read global-access-log-off) =~ ^(false|purged)$ ]] && sudo log -only-error=off || sudo log -only-error=on
436+
[[ $(conf_read global-access-log-off) =~ ^(false|purged)$ ]] && sudo log -access-log=on || sudo log -access-log=off
434437
[[ -n $(conf_read fastcgi-conf) ]] && sudo webinoly -cache-valid=[$(conf_read fastcgi-conf)]
435438
[[ -n $(conf_read auth-whitelist-ip) ]] && sudo httpauth -whitelist=$(conf_read auth-whitelist-ip)
436439
[[ -n $(conf_read blockip) ]] && sudo webinoly -blockip=$(conf_read blockip)
437440

438-
[[ $(conf_read sftp-www-data) == "true" ]] && sudo webinoly -login-www-data=on
439-
[[ $(conf_read sftp-www-data) == "false" ]] && sudo webinoly -login-www-data=off
441+
[[ $(conf_read sftp-www-data) == "true" ]] && sudo webinoly -sftp=on
442+
[[ $(conf_read sftp-www-data) == "false" ]] && sudo webinoly -sftp=off
440443

441444
http_header_referrer
442445
http_header_hsts
@@ -797,7 +800,10 @@ php_tool_memcached() {
797800
local ver=$(conf_read php-ver)
798801

799802
# Memcached (Object Cache)
800-
sudo apt -y install php${ver}-memcached php${ver}-memcache memcached
803+
sudo apt -y install php${ver}-memcached memcached
804+
805+
# Starting with 8.5: Memcache module still not available, we should consider remove it permanently.
806+
[[ $ver =~ ^(5.6|7.0|7.1|7.2|7.3|7.4|8.0|8.1|8.2|8.3|8.4)$ ]] && sudo apt -y install php${ver}-memcache
801807

802808
conf_write php-tool-memcached true
803809

lib/sites

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,9 +852,9 @@ createsite() {
852852

853853
# Check if only-error log is enabled
854854
if [[ $(conf_read global-access-log-off) == "true" && $domain != $ADMIN_TOOLS_SITE ]]; then
855-
sudo log $domain -only-error=on > /dev/null 2>&1
855+
sudo log $domain -access-log=off > /dev/null 2>&1
856856
else
857-
sudo log $domain -only-error=off > /dev/null 2>&1
857+
sudo log $domain -access-log=on > /dev/null 2>&1
858858
fi
859859

860860
# Force redirection "root" is now enabled by default!

lib/verify

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -688,14 +688,14 @@ if [[ -z $critical_mode ]]; then
688688
local ver_three_war="1"
689689
fi
690690

691-
if ! [[ $ver_php_ver =~ ^(5.6|7.0|7.1|7.2|7.3|7.4|8.0|8.1|8.2|8.3|8.4)$ ]]; then
691+
if ! [[ $ver_php_ver =~ ^(5.6|7.0|7.1|7.2|7.3|7.4|8.0|8.1|8.2|8.3|8.4|8.5)$ ]]; then
692692
echo "${dim}- [WARNING] Unknown PHP version! (${ver_php_ver}) ${end}${red}"
693693
local ver_three_war="1"
694-
elif [[ $ver_php_ver =~ ^(5.6|7.0|7.1|7.2|7.3|7.4|8.0)$ ]]; then
694+
elif [[ $ver_php_ver =~ ^(5.6|7.0|7.1|7.2|7.3|7.4|8.0|8.1)$ ]]; then
695695
echo "${dim}- [WARNING] You have an obsolete PHP version installed (${ver_php_ver}) that not even receive security updates!${end}${red}"
696696
local ver_three_war="1"
697-
elif [[ $ver_php_ver == "8.1" ]]; then
698-
echo "${blu}${dim}- [INFO] PHP v8.2 or later is recommended to get an optimal perfomance! (Current: ${ver_php_ver}) ${end}${red}"
697+
elif [[ $ver_php_ver == "8.2" ]]; then
698+
echo "${blu}${dim}- [INFO] PHP v8.3 or later is recommended to get an optimal perfomance! (Current: ${ver_php_ver}) ${end}${red}"
699699
fi
700700

701701
# PHP Workers!
@@ -1169,6 +1169,13 @@ if [[ -z $critical_mode ]]; then
11691169
fi
11701170
fi
11711171

1172+
if [[ $(conf_read smtp) == "true" && $(conf_read php-tool-postfix) != "true" ]]; then
1173+
echo "- [ERROR] Seems like SMTP is configuraded, but Postfix is not found!"
1174+
local ver_seven_err="1"
1175+
elif [[ $(conf_read smtp) == "true" ]]; then
1176+
echo "${blu}${dim}- [INFO] SMTP is Enabled! Be sure SPF, DKIM and DMARC are also configured!${end}${red}"
1177+
fi
1178+
11721179
if [[ $ver_seven_err == "1" ]]; then
11731180
echo "(7) Additional Tools Verification Test has failed!"
11741181
elif [[ $ver_seven_war == "1" ]]; then

templates/general/conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
# SFTP Access for www-data user
101101
# Values: boolean (true/false)
102102
# Default: false
103-
# Same as: sudo webinoly -login-www-data=on
103+
# Same as: sudo webinoly -sftp=on
104104
###########################
105105
#sftp-www-data:false
106106

@@ -109,7 +109,7 @@
109109
# Values: boolean (true/false)
110110
# Default: true
111111
# Note: This setting will be applied to new sites, or for existing sites 'access log' needs to be reenabled (same for global).
112-
# Same as: sudo log -only-error=on
112+
# Same as: sudo log -access-log=off
113113
###########################
114114
#global-access-log-off:true
115115

usr/stack

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ purge_mysql_client() {
5555

5656
purge_nginx_tools() {
5757
# Remove additional tools
58-
[[ $(conf_read login-www-data) == "true" ]] && webinoly -login-www-data=off
58+
[[ $(conf_read login-www-data) == "true" ]] && webinoly -sftp=off
5959
[[ $(conf_read nginx-tool-ssl) == "true" ]] && stack -letsencrypt -purge=force
6060
[[ $(conf_read nginx-tool-bkp) == "true" ]] && stack -backups -purge=force
6161
[[ $(conf_read mysql-tool-pma) == "true" ]] && stack -pma -purge=force
@@ -231,7 +231,10 @@ elif [[ -n $purge && -n $php ]]; then
231231
ver=$(conf_read php-ver)
232232
sudo systemctl stop php${ver}-fpm
233233

234-
sudo apt -y purge php${ver}-common php${ver}-cli php${ver}-fpm php${ver}-curl php${ver}-gd php${ver}-imap php${ver}-readline php${ver}-mysql php${ver}-mbstring php${ver}-bcmath php${ver}-mysql php${ver}-opcache php${ver}-zip php${ver}-xml php${ver}-soap php${ver}-imagick php${ver}-msgpack php${ver}-igbinary php${ver}-intl php-pear graphviz ghostscript
234+
sudo apt -y purge php${ver}-common php${ver}-cli php${ver}-fpm php${ver}-curl php${ver}-gd php${ver}-imap php${ver}-readline php${ver}-mysql php${ver}-mbstring php${ver}-bcmath php${ver}-mysql php${ver}-zip php${ver}-xml php${ver}-soap php${ver}-imagick php${ver}-msgpack php${ver}-igbinary php${ver}-intl php-pear graphviz ghostscript
235+
236+
# Starting with 8.5: Opcache extension is now always bundled in core, cannot be installed separately.
237+
[[ $ver =~ ^(5.6|7.0|7.1|7.2|7.3|7.4|8.0|8.1|8.2|8.3|8.4)$ ]] && sudo apt -y purge php${ver}-opcache
235238

236239
# For old packages - before ondrej split modules
237240
sudo apt -y purge php-imagick php-msgpack
@@ -547,7 +550,8 @@ elif [[ -n $purge && -n $memcached ]]; then
547550

548551
if [[ $answer == [Yy] || $(conf_read force-flag) == "true" ]]; then
549552
ver=$(conf_read php-ver)
550-
sudo apt -y purge php${ver}-memcached php${ver}-memcache memcached
553+
sudo apt -y purge php${ver}-memcached memcached
554+
[[ $ver =~ ^(5.6|7.0|7.1|7.2|7.3|7.4|8.0|8.1|8.2|8.3|8.4)$ ]] && sudo apt -y purge php${ver}-memcache
551555
purge_autoremove="true"
552556

553557
# For old packages - before ondrej split modules

0 commit comments

Comments
 (0)