installed php 7.1 with phpbrew
see https://github.com/phpbrew/phpbrew for installation
install php 7.1 custom stuff
phpbrew install 7.1 +cli +fpm +json +curl +mbstring +mysql +opcache +readline +xml
I needed to run php-fpm with phpbrew
phpbrew fpm start
and in the php-fpm config file /Users//.phpbrew/php/php-7.1.11/etc/php-fpm.conf this file is included /Users//.phpbrew/php/php-7.1.11/etc/php-fpm.d/www.conf and in www.conf the socket listen was set to
listen = /Users/<user>/.phpbrew/php/php-7.1.11/var/run/php-fpm.sock
so updating fastcgi_pass in nginx.conf connected it /usr/local/etc/nginx/nginx.conf
fastcgi_pass unix:/Users/messel/.phpbrew/php/php-7.1.11/var/run/php-fpm.sock;
full server block in nginx.conf
server {
listen 8080 default_server;
server_name localhost;
root /Users/messel/Desktop/Dropbox/code/<pathToCode>;
access_log /usr/local/Cellar/nginx/1.12.2_1/logs/access.log;
index index.html index.php;
location ~ \.php$ {
try_files $uri /index.html index.php;
fastcgi_pass unix:/Users/messel/.phpbrew/php/php-7.1.11/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
}