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?
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:
You can find php-fpm file in your system and execute the command at absolute path : find / -type f -iname "php-fpm"