Upgrading to PHP 7.1 was easy, the only place I encouraged issues, was with figuring out where the socket was located, after figuring this out I felt write an article over this would be a good idea and a big time saver for people.

apt-get install apt-transport-https lsb-release ca-certificates
Code language: Bash (bash)
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
Code language: Bash (bash)
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
Code language: Bash (bash)
apt-get install php7.1-fpm php7.1 php7.1-cli php7.1-curl php7.1-mysql php7.1-sqlite3 php7.1-gd php7.1-xml php7.1-mcrypt
Code language: Bash (bash)

Edit the Nginx config and replace the older FPM socket with a new one.

fastcgi_pass unix:/run/php/php7.1-fpm.sock;
Code language: Bash (bash)

Confused replace the whole PHP block with this.

location ~ \.php$ { 
fastcgi_pass unix:/run/php/php7.1-fpm.sock; fastcgi_index index.php; 
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
include fastcgi_params; 
}

Code language: Nginx (nginx)

I compiled a list of software and services that I use to improve my workflow, here is the link to the list.

Darryl Dias

I’m Darryl. I’m a 3D Artist, Programmer and Linux enthusiast. On this site I share my insights, tips and tricks, tutorials, methods and best practices.