User Tools

Site Tools


troubleshooting:php

troubleshooting guides for php

connect() to unix:/var/run/php/php7.3-fpm.sock failed

  1. Check if PHP-FPM is running: The error message suggests that Nginx is trying to connect to a Unix socket file, which is used by PHP-FPM to receive requests from Nginx. You should verify that PHP-FPM is running and the socket file exists. You can do this by checking the status of the PHP-FPM service or by looking for the socket file in the specified location.
  2. Check the Nginx configuration: Make sure that the Nginx server block configuration is pointing to the correct location of the PHP-FPM socket file. You can check this by examining the Nginx configuration file, usually located in /etc/nginx/sites-available or /etc/nginx/conf.d.
  3. Check permissions on the socket file: Ensure that the Nginx worker processes have permission to access the PHP-FPM socket file. You can check the ownership and permissions on the file by using the “ls -l” command.
  4. Verify the PHP-FPM configuration: Make sure that the PHP-FPM configuration file, usually located in /etc/php/7.3/fpm/pool.d, is configured correctly and that the PHP-FPM service is listening on the correct socket file.
  5. Restart Nginx and PHP-FPM services: After making any changes to the Nginx or PHP-FPM configuration, you should restart the respective services to apply the changes.

Related logfiles:

  • /var/log/nginx
  • /var/log/php-fpm
troubleshooting/php.txt · Last modified: 2023/02/14 10:54 by kamaradski