Tag Archives: ERROR: [pool www] cannot get uid for user ‘localhost.localdomain’

ERROR: [pool www] cannot get uid for user ‘localhost.localdomain’ [Solved]

If PHP is newly installed and an error is reported,

The following information:

12月 04 14:56:00 localhost.localdomain php-fpm[54862]: [04-Dec-2021 14:56:00] ERROR: [pool www] cannot get uid for user 'localhost.localdomain'
12月 04 14:56:00 localhost.localdomain php-fpm[54862]: [04-Dec-2021 14:56:00] ERROR: FPM initialization failed

This is because there is a problem with our PHP default parameter settings

It needs to be modified in this script

sudo vi /etc/opt/remi/php72/php-fpm.d/www.conf
We need to find out our username in cat /etc/passwd
cat /etc/group to see the user group we are interested in.
Just change this parameter again.

Finally, restart PHP

sudo systemctl restart php72-php-fpm.service