Skip to content

Unable to bind listening socket for address '/run/php-fpm/php-fpm.sock' #9736

@nibazshab

Description

@nibazshab

Description

I do ./configure --enable-fpm and make,make install to install php, and my www.conf is this

[www]
user = http
group = http
listen = /run/php-fpm/php-fpm.sock
listen.owner = http
listen.group = http
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3

when i do /usr/local/sbin/php-fpm, i got these

[12-Oct-2022 20:56:13] ERROR: unable to bind listening socket for address '/run/php-fpm/php-fpm.sock': No such file or directory (2)
[12-Oct-2022 20:56:13] ERROR: FPM initialization failed

i have to create /run/php-fpm and give it right permission with my hand, then php-fpm can work correctly, and when i reboot my computer, I have to do it again

i used to start with systemd but i also got above ERROR

[Unit]
Description=The PHP FastCGI Process Manager
After=network.target

[Service]
Type=notify
PIDFile=/run/php-fpm/php-fpm.pid
ExecStart=/usr/local/sbin/php-fpm --nodaemonize --fpm-config /usr/local/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID

PrivateTmp=true
PrivateDevices=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
RestrictRealtime=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_UNIX
RestrictNamespaces=true

[Install]
WantedBy=multi-user.target

PHP Version

8.1.11

Operating System

Arch LInux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions