Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to restart php-fpm.service: Unit php-fpm.service not found [closed]

My site showing error 502 Bad Gateway . on checking error log file i found error -
connect() to unix:/var/run/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client

how can i fixed this issue ?

like image 759
Manoj Patidar Avatar asked Dec 11 '17 12:12

Manoj Patidar


People also ask

How do I restart FPM?

Log into WHM as root. Search “PHP-FPM” and select PHP-FPM service for Apache. Select Yes to restart the PHP-FPM service.

What is PHP-FPM service?

PHP-FPM (FastCGI Process Manager) is an alternative to FastCGI implementation of PHP with some additional features useful for sites with high traffic. It is the preferred method of processing PHP pages with NGINX and is faster than traditional CGI based methods such as SUPHP or mod_php for running a PHP script.

How do I know if PHP-FPM is installed?

To find out php version installed on the server type any one of the following commands on your server. Open the terminal prompt and then type the following commands. Are you using php-fpm? Get php version using the php-fmp -v or php-fpm73 -v command.


1 Answers

Depending what version of php-fpm you are using, you need one of the following commands:

sudo service php5-fpm restart        // php 5.x
sudo service php7.0-fpm restart      // php 7.0.x
sudo service php7.1-fpm restart      // php 7.1.x
like image 198
Jerodev Avatar answered Sep 27 '22 03:09

Jerodev