Step by Step procedure to update to latest PHP 8.3.11

  1. Add repository for PHP8.3.11 since ubuntu lts 22.04 wont update after 8.1.2
    sudo add-apt-repository ppa:ondrej/php
  2. Upgrade everything including installing PHP 8.3.11
    sudo apt upgrade
  3. Reboot
    sudo reboot
  4. Copy new php config to running
    sudo cp /etc/php/8.3/fpm/pool.d/www.conf /etc/php/8.3/fpm/pool.d/librenms.conf
  5. Edit librenms config
    change [www] to [librenms]
    change user and group from www-data → librenms
    sudo nano /etc/php/8.3/fpm/pool.d/librenms.conf
  6. Edit librenms config
    change [www] to [librenms]
    change user and group from www-data → librenms
    sudo nano /etc/php/8.3/fpm/pool.d/www.conf
  7. Restart php service
    sudo systemctl restart php8.3-fpm
  8. Check php service
    systemctl status php8.3-fpm.service
  9. Update nginx configuration and fastcgi_pass row to :
    sudo nano /etc/nginx/conf.d/librenms.conf
    fastcgi_pass unix:/run/php/php8.3-fpm.sock;
  10. Restart the nginx service
    sudo systemctl restart nginx
  11. Check the nginx service
    sudo systemctl status nginx
  12. Go to web and check with validate option
  13. Go to cli and with ./validate command
  14. If needed update the clocks with
    sudo timedatectl set-timezone [your timezone goes here]
    sudo dpkg-reconfigure -f noninteractive tzdata
    sudo systemctl restart mysql
    sudo nano /etc/php/8.3/fpm/php.ini
    (uncomment and change the field → date.timezone = [your timezone goes here])
    sudo nano /etc/php/8.3/cli/php.ini
    (uncomment and change the field → date.timezone = [your timezone goes here])
  15. Restart the service
    sudo systemctl restart php*-fpm.service
4 Likes

Thanks for the info …
i just upgrade to ubuntu 24 from 22.

Steps to upgrade almost same.

2 Likes

Hello friend,
i tries your procedure to my librenms server on Ubuntu 20.04.6 LTS but i stucked on your step 4. :frowning:
After reboot server i don’t have created folder with php 8.3 a i can’t copy new copy php config.
I agreed all after added command sudo apt upgrade

Thanks, this was a big help. Only issue I ran into was I still using Apache in Ubuntu 22, had to move over to nginx.

I am running Ubuntu 22.04 LTS. I added the repository and ran sudo apt upgrade but it did not install PHP 8.3.

Using FreeBSD I just threw all the php83 pkg names in a temp file and executed the pkg install against this file.

php83-composer
php83-curl
php83-dom
php83-fileinfo
php83-gd
php83-gmp
php83-mbstring
php83-mysqli
php83-pdo
php83-pdo_mysql
php83-pecl-json_post
php83-posix
php83-session
php83-simplexml
php83-snmp
php83-sockets
php83-tokenizer
php83-xml
php83-zip
php83-zlib

pkg install cat /tmp/pkglist

Then after a restart it was all done and nothing further I had to do. Now running 8.3.12

Is there a link to instructions for upgrading to [PHP 8.3.11] for CentOS9 and Apache?

Hi.

Just tested everything again and it worked for me on 8.1.2 php install.
Looks like it did not install php 8.3.1x for you.
There is an confirmation required for you to accept the gpg key and repository being added.
After that confirmation it will install latest php from newly added repo.

I was able to install PHP 8.3 manually and then continue with the steps. Up and running now, much obliged.

Hmm, for the reasons unknown it seems that system wont fetch the php8.3.12 as of now via sudo apt upgrade command.
For me it works on multiple machines and I made the instructions based on that.
I did not encounter the refusal of the PC or VM to install php8.3.x with sudo apt upgrade command.
It would be cool if you could share stdout of the apt just to see where it fails, ie why doesn’t install php8.3.x automatically.

All the Best