diff --git a/ubuntu/resources/config.sh b/ubuntu/resources/config.sh index 058d343..b18a685 100755 --- a/ubuntu/resources/config.sh +++ b/ubuntu/resources/config.sh @@ -26,5 +26,5 @@ database_port=5432 # port number database_backup=false # true or false # General Settings -php_version=7.4 # PHP version 5.6 or 7.0, 7.1, 7.2 +php_version=8.1 # PHP version 5.6 or 7.0, 7.1, 7.2, 8.1 letsencrypt_folder=true # true or false diff --git a/ubuntu/resources/ioncube.sh b/ubuntu/resources/ioncube.sh index aef2661..83a4e72 100755 --- a/ubuntu/resources/ioncube.sh +++ b/ubuntu/resources/ioncube.sh @@ -92,3 +92,14 @@ if [ ."$php_version" = ."7.4" ]; then #restart the service service php7.4-fpm restart fi +if [ ."$php_version" = ."8.1" ]; then + #copy the php extension .so into the php lib directory + cp ioncube/ioncube_loader_lin_8.1.so /usr/lib/php/20210902 + + #add the 00-ioncube.ini file + echo "zend_extension = /usr/lib/php/20210902/ioncube_loader_lin_8.1.so" > /etc/php/8.1/fpm/conf.d/00-ioncube.ini + echo "zend_extension = /usr/lib/php/20210902/ioncube_loader_lin_8.1.so" > /etc/php/8.1/cli/conf.d/00-ioncube.ini + + #restart the service + service php8.1-fpm restart +fi diff --git a/ubuntu/resources/php.sh b/ubuntu/resources/php.sh index 577533d..4c048e4 100755 --- a/ubuntu/resources/php.sh +++ b/ubuntu/resources/php.sh @@ -13,6 +13,11 @@ verbose "Configuring PHP" #add the repository if [ ."$os_name" = ."Ubuntu" ]; then + #22.04.x - /*jammy/ + if [ ."$os_codename" = ."jammy" ]; then + echo "Ubuntu 22.04 LTS\n" + php_version=8.1 + fi #20.04.x - /*bionic/ if [ ."$os_codename" = ."focal" ]; then echo "Ubuntu 20.04 LTS\n" @@ -53,6 +58,9 @@ fi if [ ."$php_version" = ."7.4" ]; then apt-get install -y php7.4 php7.4-cli php7.4-fpm php7.4-pgsql php7.4-sqlite3 php7.4-odbc php7.4-curl php7.4-imap php7.4-xml php7.4-gd php7.4-mbstring fi +if [ ."$php_version" = ."8.1" ]; then + apt-get install -y php8.1 php8.1-cli php8.1-fpm php8.1-pgsql php8.1-sqlite3 php8.1-odbc php8.1-curl php8.1-imap php8.1-xml php8.1-gd php8.1-mbstring +fi #update config if source is being used if [ ."$php_version" = ."5" ]; then @@ -75,6 +83,10 @@ if [ ."$php_version" = ."7.4" ]; then verbose "version 7.4" php_ini_file='/etc/php/7.4/fpm/php.ini' fi +if [ ."$php_version" = ."8.1" ]; then + verbose "version 8.1" + php_ini_file='/etc/php/8.1/fpm/php.ini' +fi sed 's#post_max_size = .*#post_max_size = 80M#g' -i $php_ini_file sed 's#upload_max_filesize = .*#upload_max_filesize = 80M#g' -i $php_ini_file sed 's#;max_input_vars = .*#max_input_vars = 8000#g' -i $php_ini_file @@ -102,6 +114,9 @@ fi if [ ."$php_version" = ."7.4" ]; then systemctl restart php7.4-fpm fi +if [ ."$php_version" = ."8.1" ]; then + systemctl restart php8.1-fpm +fi #init.d #/usr/sbin/service php5-fpm restart #/usr/sbin/service php7.0-fpm restart