Skip to content
Advertisement

after upgrade to php8.0, nginx still uses php7.2 for PHP-FPM

I’m running Ubuntu 18.04 with nginx/1.14.0. I have been running PHP 7.2 but some of my web applications require a newer php for security reasons.

Since it is nginx, I use PHP-FPM.

I used apt to upgrade to the latest version of PHP.

JavaScript

So that looks right. But the application still complains about PHP-FPM 7.2 and phpinfo confirms:

JavaScript

So it sounds like I should change the PHP conf file. Here’s what I get when I try to find it:

JavaScript

OK. So I seek php.ini:

JavaScript

I am not seeing a conf file that would make the choice for NGINX or PHP where I would tell it to use PHP-FPM 8.0.

How do I get NGINX/PHP to use the new version of PHP that is on my server instead of the old one?

Advertisement

Answer

in each server, you can define which version of PHP, Nginx should use:

JavaScript

or :

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement