Difference between revisions of "Upgrade to PHP 8.1"

From rbachwiki
Jump to navigation Jump to search
(Created page with " $ sudo apt update $ sudo apt upgrade $ sudo apt install ca-certificates apt-transport-https software-properties-common ===Add the Reoository == sudo add-apt-repository ppa:ondrej/php")
 
Line 1: Line 1:
sudo apt install software-properties-common
sudo apt update
===Add the Repository ===
sudo add-apt-repository ppa:ondrej/php
===Next, update the system repositories to start using the PPA===
  $ sudo apt update
  $ sudo apt update
$ sudo apt upgrade
$ sudo apt install  ca-certificates apt-transport-https software-properties-common


===Add the Reoository ==
$ sudo apt install php8.1 libapache2-mod-php8.1
  sudo add-apt-repository ppa:ondrej/php
 
$ sudo systemctl restart apache2
 
sudo nano /etc/php/8.1/apache2/php.ini
 
upload_max_filesize = 32M
post_max_size = 48M
 
===Replace the current enabled PHP version with your version.===
  sudo a2dismod php7.4
sudo a2enmod php8.1

Revision as of 18:13, 29 November 2022

sudo apt install software-properties-common
sudo apt update

Add the Repository

sudo add-apt-repository ppa:ondrej/php

Next, update the system repositories to start using the PPA

$ sudo apt update
$ sudo apt install php8.1 libapache2-mod-php8.1
$ sudo systemctl restart apache2
sudo nano /etc/php/8.1/apache2/php.ini
upload_max_filesize = 32M 
post_max_size = 48M 

Replace the current enabled PHP version with your version.

sudo a2dismod php7.4
sudo a2enmod php8.1