1

I want to upgrade php version from 7.2 to 7.4 I did these commands and installed 7.4 on server

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update

sudo apt install php7.4-fpm

when I wanted to update it on nginx sites conf I didn't know where to modify it here is the nginx php conf

location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
    }

BTW I'm using openresty nginx

Luuk
  • 12,245
  • 5
  • 22
  • 33
Alfredo
  • 21
  • 4
  • What is the output if you add a line like this in a php file? `echo phpversion();` ? If the answer is `7.4` you are ready, if not then you need to take an extra action. – Luuk May 15 '21 at 10:08
  • Try this link on digitalocean [How to update nginx & php](https://www.digitalocean.com/community/questions/how-to-update-nginx-php) . It will be the most suitable answer . – Kaviranga May 15 '21 at 10:44

0 Answers0