If you are receiving the notice “Not enabling PHP x.y FPM by default” (with Apache webserver) after upgrading your Ubuntu server then you need to spend time behind the server and remain attentive during reboot. After I received this notice, I Google searched and read at least 50 web pages to understand where the error is arriving. The main information I got from Linode’s community:
stevewi is a skilled person and his observation will not be wrong.
This is an example from an Ubuntu 20.04 LTS with PHP 7.2:
Processing triggers for php7.2-fpm (7.2.34-39+ubuntu20.04.1+deb.sury.org+1) ...
NOTICE: Not enabling PHP 7.2 FPM by default.
NOTICE: To enable PHP 7.2 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.2-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
What is the Official Fix of This Notice?
You are receiving this message either because you are using an older version of Ubuntu (not the latest one) or you are using an older version of PHP. Ubuntu lists the date of the end of standard support (EOS):
Probably your system supports PHP 8.x out of the box, and there are references to PPAs of that version. You are “forcefully” chosen a PHP version to run PHP-FPM which Ubuntu’s apt does not support.
This is probably a bug which is not fixed. EOS in Canonical’s language means EOL. If you run
pro security-status command, you’ll receive this information:
1272 packages installed:
995 packages from Ubuntu Main/Restricted repository
158 packages from Ubuntu Universe/Multiverse repository
116 packages from third parties
3 packages no longer available for download
To get more information about the packages, run
pro security-status --help
for a list of available options.
This machine is receiving security patching for Ubuntu Main/Restricted
repository until 2025.
This machine is NOT attached to an Ubuntu Pro subscription.
Ubuntu Pro with 'esm-infra' enabled provides security updates for
Main/Restricted packages until 2030.
Ubuntu Pro with 'esm-apps' enabled provides security updates for
Universe/Multiverse packages until 2030 and has 37 pending security updates.
Try Ubuntu Pro with a free personal subscription on up to 5 machines.
Learn more at https://ubuntu.com/pro
Ubuntu Pro is free up to five servers for personal usage. Their “personal usage” includes usage for “small business”. They have not mentioned whether you can run a professional WordPress blog on the server and make money while using their free subscription. Whether you’ll use their free offer or not, it is your decision.
We suggest upgrading the server to the latest version and trying to use the latest version of PHP.
Is This Notice Dangerous?
Yes, the PHP-FPM on your server may not work after a reboot. Because we use Apache, we can enable
mod_php, and disable
mpm_event to avoid disaster after a reboot. Apache needs some scripts to do this automatically.
If you are using NGINX, the situation will be pathetic. If do not know whether it happens with NGINX too. Presently, PHP-FPM will be up and running, you can run
htop and watch
php-fpm: pool www are working. Also, you can run
ps -ef | grep php to check. But it is difficult to say whether a reboot will keep PHP-FPM running.
When you are a single person managing one or more servers with serious and earning websites, you should use failproof things which are clearly licensed under GPL compatible license.
mpm_event is almost fail-proof. When we suggest to Install Apache MPM Event and PHP-FPM on Ubuntu Server, we assume that you can fight to fix odd issues.