This guide is only for customers running old “source code” installations.
For those running dockerised version use this guide: Php8.2 update - dockerised version
Installing PHP 8.2 on Ubuntu 22.04
1. Run system updates
$ apt update && apt upgrade -y
2. Add Ondrey sury PPA repository
$ add-apt-repository ppa:ondrej/php
3. Update repositories again
$ apt update
4. Install PHP 8.2 and all modules needed for eramba
$ apt install php8.2 php8.2-mysql php8.2-intl php8.2-curl php8.2-mbstring php8.2-xml php8.2-zip php8.2-ldap php8.2-gd php8.2-bz2 php8.2-sqlite3 php8.2-redis
*For RHEL and CentOS:
$ dnf install php8.2 php8.2-mysql php8.2-intl php8.2-curl php8.2-mbstring php8.2-xml php8.2-zip php8.2-ldap php8.2-gd php8.2-bz2 php8.2-sqlite3 php8.2-redis php8.2-process
5. Copy php.ini files from the previous PHP version
$ cp /etc/php/8.1/apache2/php.ini /etc/php/8.2/apache2/.
$ cp /etc/php/8.1/cli/php.ini /etc/php/8.2/cli/.
6. Disable php8.1
$ a2dismod php8.1
7. Enable php8.2
$ a2enmod php8.2
8. Restart apache
$ systemctl restart apache2
9. Make sure that cli and apache using same PHP version
for cli:
$ php -v
for apache:
reference: How To Install PHP 8.2 on Ubuntu 22.04 - TechvBlogs