5

I am running a webserver with Ubuntu 16 and php-fpm to process PHP requests. php-fpm has been installed via apt-get from the default Ubuntu repositories.

According to this reference I should be able to run php-fpm -t to test the configuration. However, this only tells me, the there is no php-fpm. I quite sure, it is (the webserver incl. PHP processing works well, and the service php7.0-fpm is up and running) ... but no executable with the name php-fpm.

How can I test a php-fpm configuration change with PHP 7 before reloading the configuration?

BurninLeo
  • 900
  • 3
  • 12
  • 30

2 Answers2

12

To test the configuration file of PHP FPM (PHP 7.0), run:

sudo php-fpm7.0 -t

Note that the command name could be somewhat confusing, since the systemd service is named php7.0-fpm.

If everything is OK, this is an example output:

[20-Jun-2022 21:50:07] NOTICE: configuration file /etc/php/7.0/fpm/php-fpm.conf test is successful
Valerio Bozzolan
  • 314
  • 2
  • 15
BurninLeo
  • 900
  • 3
  • 12
  • 30
1

You can find php-fpm file in your system and execute the command at absolute path : find / -type f -iname "php-fpm"

gmini
  • 21
  • 1
  • 5