[php-src] PR #11066: Add warning to log, when fpm socket was not registered on the expected path

From: Date: Wed, 12 Apr 2023 23:20:46 +0000
Subject: [php-src] PR #11066: Add warning to log, when fpm socket was not registered on the expected path
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-22313@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/11066 Author: JoshuaBehrens I decided it to be a warning, because you can still run against the newly created socket file but fail it for the configuration test. It felt right to do it like that. ## Where am I coming from? I have an experiments folder deep down in a folder structure on my work machine (/home/name/projects/delete-to-free-storage/experiments). In there I cloned a project where I wanted to try out devenv for a part in a subfolder (/home/name/projects/delete-to-free-storage/experiments/foobar/php-web). I set up devenv, it uses process-compose to orchestrate php-fpm for me and it places the php-fpm socket file in a project specific sub directory (/home/name/projects/delete-to-free-storage/experiments/foobar/php-web/.devenv/state/php-fpm/web). When I opened up the nginx served page, all I get is a white page and nginx prints into the log dialing backend: dial unix /home/name/projects/delete-to-free-storage/experiments/foobar/php-web/.devenv/state/php-fpm/web.sock: connect: invalid argument. So now try to debug this. You have multiple sources for this error (devenv, process-compose, nix, a nix package for php, php itself, nginx, a nix package for nginx). I was looking into to this with @jochenmanz for several days. Our question was: "Why is the file extension missing?" We were looking through the different tools but no solution Just today I just received the message "What OS are you on and did you know that socket file names are limited in length?" After just moving the project into a directory with a shorter path, we saw, that it was working and the socket file had the .sock extension as expected. "the extension .sock was missing" is just a coincidence in after a string length cut. So we found the issue it was on binding the socket. We found some checks against in php for every socket access. But for some reason not for php-fpm. The socket will just get cut off. So I decided to fix that so have other people minds less stressed :)

« previous php.git-pulls (#22313) next »