PHP 7.1 on Debian for NGINX

Jul 23, 2017
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
wget -O /etc/apt/trusted.gpg.d/php.gpg
echo "deb $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
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

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

fastcgi_pass unix:/run/php/php7.1-fpm.sock;

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; 

If you like this content, please consider buying me a coffee.

Buy me a coffeeBuy me a coffee

You will get access to contributer exclusive resources and content.

Thank you!

Darryl Dias

I am a student, artist, and author currently living in Florida. My interests range from technology to arts. I am also interested in programming, writing

Analytics by GoSquared