Search code examples
phpfpm

How can I determine the current config of php-fpm?


I'd like to determine the current config that is 'loaded'. These would be all the values listed here: http://php.net/manual/en/install.fpm.configuration.php

These values are not returned by phpinfo().


Solution

  • If you have access to server, try, depending on php version

    sudo php-fpm7.0 -tt
    sudo php-fpm7.x -tt
    sudo php-fpm7.4 -tt
    
    sudo php-fpm8.0 -tt
    sudo php-fpm8.x -tt
    sudo php-fpm8.4 -tt
    

    It test the current config file and show config params values (also default ones).

    The displayed values can differs from current running config if a modification happened and php-fpm hasn't been reloaded.

    Only tested out on php-fpm 8.1

    Note: Output from the command goes to standard error and that makes piping to something like grep or less inconvenient. To account for this:

    php-fpm8.2 -tt 2>&1 | grep access