Using: Ubuntu 20.04
PHP startup failedbecause /var/run/php-fpm/php7.4-fpm.sock and /var/run/php-fpm/php7.4-fpm.pidare missing.
The details are as follows: (Feedback fromsystemctl status php7.4-fpm.service)
● php-fpm7.4[3465899]: Error: Unable to bind Listening socket at address "/var/run/php-fpm/php7.5-fpm.sock": There is no such thing File or directory (2)
● php-fpm7.4[3465899]: Error: Unable to bind Listening socket at address "/run/php-fpm/php7.5-fpm.pid": There is no such thing File or directory (2)
I checked "/etc/php/7.4/fpm/pool.d/www.conf" but there is the following code in the file:
;li sten = 127.0.0.1:9000 lis ten = /var/run/php-fpm/php7.4-fpm.sock
First problem: It is searching for
php7.5-fpm.sockinstead ofphp7.4-fpm.sockBut since you confirmed that your
/etc/php/7.4/fpm/pool.d/www.confdoes havelisten = /var/run/php-fpm/php7.4 -fpm.sock, I assumephp7.5-fpm.socknaming has been processed/adjusted.Second Problem: When your FPM is running, the
.sockfile does not exist. To resolve this issue, run the following command:Notice: If your permission is denied, you should use
sudoto execute the above command.Then restart your PHP-FPM service.
Hope it helps!