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.sock
instead ofphp7.4-fpm.sock
But since you confirmed that your
/etc/php/7.4/fpm/pool.d/www.conf
does havelisten = /var/run/php-fpm/php7.4 -fpm.sock
, I assumephp7.5-fpm.sock
naming has been processed/adjusted.Second Problem: When your FPM is running, the
.sock
file does not exist. To resolve this issue, run the following command:Notice: If your permission is denied, you should use
sudo
to execute the above command.Then restart your PHP-FPM service.
Hope it helps!