You are not logged in.

#1 2023-02-13 06:41

rafaelramos
Member
From: Brazil
Registered: 2016-07-19
Posts: 146

PHP 8 on Q4OS

The official Q4OS (and Debian) repository provides PHP 7.4 by default, which is already well outdated.

Does anyone know a safe way to install PHP 8 on Q4OS?

Offline

#2 2023-02-13 12:53

hchiper
Member
From: Belgium
Registered: 2020-07-28
Posts: 410

Re: PHP 8 on Q4OS

If you can't wait Q4OS 5 release (based on Debian 11 and coming with PHP 8.2), you can follow instructions from  the PHP Manual: Installation and Configuration.


Q4OS machines: [Samsung R519 - Pentium T4200 2.0 GHz - 4 GB RAM - 500 GB SSD] & [Sony Vaio - Pentium P6000 1.87 GHz - 8 GB RAM - 500 GB SSD]

Offline

#3 2023-02-13 18:01

rafaelramos
Member
From: Brazil
Registered: 2016-07-19
Posts: 146

Re: PHP 8 on Q4OS

hchiper wrote:

If you can't wait Q4OS 5 release (based on Debian 11 and coming with PHP 8.2), you can follow instructions from  the PHP Manual: Installation and Configuration.

Hello hchiper,

I was looking for a more simplified way through apt-get...

I found this tutorial here, but I haven't tried it yet:

https://computingforgeeks.com/how-to-in … ian-linux/

Offline

#4 2023-02-20 06:25

rafaelramos
Member
From: Brazil
Registered: 2016-07-19
Posts: 146

Re: PHP 8 on Q4OS

I installed PHP 8 on Q4OS 4.11 in a simple way with "apt-get"...

Adding the sury.org apt:

sudo apt update
sudo apt install -y lsb-release ca-certificates apt-transport-https software-properties-common gnupg2
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list
wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add -

Installing PHP 8:

sudo apt update
sudo apt install php8.0
php -v

Installing the most important extensions:

sudo apt install php8.0-{mysql,cli,common,imap,ldap,xml,fpm,curl,mbstring,zip,sqlite3}

Disabling PHP 7.4 and enabling PHP 8.0:

sudo a2dismod php7.4
sudo a2enmod php8.0
sudo systemctl restart apache2

Offline

Board footer

Powered by FluxBB