PHP upgrade 7.4.3 to 8.1

Hello,
Can someone help me or send me a guide how to upgrade PHP from 7.4.3 to 8.1 which is already the minimum supported version?
I am running LibreNMS on Ubuntu 20.04.3 LTS.

https://www.google.ca/search?q=PHP+upgrade+7.4.3+to+8.1+20.4.3+nginx

2 Likes

Upgrade to 22.04 and you get it out of box

2 Likes

tried to upgrade to 22.04 but librenms is not working any more.
lot of PHP errors, nginx,…

inplace upgrade is not an option…

I just ran do-release-upgrade on one of my 20.04 servers. Some things were missing after, so I ran the apt install line from the install docs:

apt install acl curl fping git graphviz imagemagick mariadb-client mariadb-server mtr-tiny nginx-full nmap php-cli php-curl php-fpm php-gd php-gmp php-json php-mbstring php-mysql php-snmp php-xml php-zip rrdtool snmp snmpd whois unzip python3-pymysql python3-dotenv python3-redis python3-setuptools python3-systemd python3-pip

I also had to configure the php-fpm pool from the docs, since it already exists, I just copied it:

cp /etc/php/7.4/fpm/pool.d/librenms.conf /etc/php/8.1/fpm/pool.d/librenms.conf
systemctl restart php8.1-fpm

Then run ./daily.sh to switch back to the main release from the support branch (or wait for it to run)

su - librenms
./daily.sh

Double check validate for other known issues. I had to fix php timezone too.

4 Likes

Thank you very much! Works :slight_smile:

all i had to do was setting the timezone here:
vi /etc/php/8.1/fpm/php.ini
vi /etc/php/8.1/cli/php.ini

Thank you all for your recommendations. I upgraded Ubuntu 20.04. to 22.04. and Libre works.

I upgraded to 22.04 and it still did not work. I ran command

systemctl | grep php

and could see both 7.4-fpm.sevice and 8.1 service running.

Copied the librenms.conf file from 7.4 to 8.1 and removed form 7.4 location. Reboot and all working on 8.1.

sudo cp /etc/php/7.4/fpm/pool.d/librenms.conf /etc/php/8.1/fpm/pool.d/librenms.conf
sudo rm /etc/php/7.4/fpm/pool.d/librenms.conf

I am a newbie at libre so probably not the best way but it worked for me

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.