Upgrade php8.3 to php8.4 on debian & php-fpm

PHP runs the backend of my website, and keeping anything that is running on your server up to date is one of the most important steps in security.

First install the php8.4 packages from apt.
Add the Ondřej Surý’s PHP Repository

This Guide assumed all you needed to do is upgrade your php version.

Below are instructions that you can use to switch from the prefork to the fastcgi module, these have a little more explanation if you are not familiar with apache2 web server.

Step 1: Changing the Multi-Processing Module

The php7.4 module in Apache is the inbuilt one – unfortunately it doesn’t work for PHP-FPM. So we need to do some work to make this work.

First, stop Apache while we make tweaks to the configs

Then, disable the in-built prefork driven PHP 7.4 module

Disable the prefork module.

Enable the event mpm module

Now we configure the PHP components, which is fairly straightforward…

Step 2: Configure Apache’s FastCGI manager with PHP

If you haven’t done this already, install PHP FPM

If that command doesn’t work, use this one:

Install the FCGI module for Apache

Enable requisite libraries and modules

Enable the PHP-FPM module’s configuration (which will already be present)

Test your configuration is good before restarting apache2

Now you should be running the most efficient php processing module for apache2 and the most up to date php version 🙂

One response

  1. Spot on with this write-up, I really feel this amazing site needs a lot more attention. I’ll probably be back again to read more, thanks for the advice!

Leave a Reply to youtube downloader Cancel reply

Your email address will not be published. Required fields are marked *