0

I have php 5.6.30 installed and running alongside nginx 1.12.1 on ubuntu 14.04.5

I want to run laravel 5.5 so I need to get php7+ and several php extensions.

Here is how I try to install them

$ sudo apt-get install php7.1 php7.1-cli php7.1-curl php7.1-json php7.1-mcrypt php7.1-opcache php7.1-xml php7.1-cgi php7.1-common php7.1-fpm php7.1-mbstring php7.1-mysql php7.1-readline php7.1-xmlrpc

Last message says "php7.1-fpm start/running, process 24107"

$ php -v
PHP 7.1.10-1+ubuntu14.04.1+deb.sury.org+1

But it does not have a socket file:

$ ls /var/run/php                                                                                                                                                  
php5.6-fpm.pid  php5.6-fpm.sock

So I try several things:

$ service nginx restart
 * Restarting nginx nginx

$ service php7.1-fpm start
php7.1-fpm start/running, process 4426

But still:

$ ls /var/run/php                                                                                                                                                  
php5.6-fpm.pid  php5.6-fpm.sock

So I cannot have a virtualhost for my website using fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; since its not there!

Digging a little deeper I realize that there is no configuration file for php7.1 created on my machine. Both /etc/php/7.1/fpm/conf.d and /etc/php/7.1/fpm/pool.d are empty. So I dont even know where to put listen = /run/php/php7.1-fpm.sock

Worse still, no php.ini:

$ php --ini
Configuration File (php.ini) Path: /etc/php/7.1/cli
Loaded Configuration File:         (none)
Scan for additional .ini files in: /etc/php/7.1/cli/conf.d
Additional .ini files parsed:      (none)

I have tried reinstalling several times yet I get the the same situation. What could I be missing?

Timothy
  • 101
  • 2

1 Answers1

0

Found the solution - for some reason my initial php7 installation was corrupted. Then I was uninstalling it using apt-get remove php7.0 php... and leaving some corrupt files behind

It finally worked when I used apt-get purge php7.0 php... to nuke them all and reinstall.

Timothy
  • 101
  • 2