Check final php.ini options used by Nextcloud

I added some options in services.nextcloud.phpOptions which seem to be applied because a previous warning message in Nextcloud disappeared. I also configured php options in other places and would like to see the final php options used by Nextcloud?

I tried to check the actual php.ini config file used by Nextcloud’s systemd service but it does not contain my custom settings.

  1. # systemctl status phpfpm-nextcloud.service
  2. get the systemd service file from Loaded:, i.e. /etc/systemd/system/phpfpm-nextcloud.service
  3. in the service file I see ExecStart=/nix/store/21wl7vjq6ap8s7vc3hspv13az1sa8xza-php-with-extensions-8.2.16/bin/php-fpm -y /nix/store/ngsr9xpllfbdv16xmyc89kqqhrnqngxx-phpfpm-nextcloud.conf -c /nix/store/irh2dkih5gdbdad1mml7r9921giaxav7-php.ini
  4. I open /nix/store/irh2dkih5gdbdad1mml7r9921giaxav7-php.ini
  5. The options I set in services.nextcloud.phpOptions do not appear in this file`!?

The file is relative to that in ../lib/php.ini

see nixpkgs/pkgs/development/interpreters/php/generic.nix at c6d4afecd024e0b4162d37970caa16bc5df52c47 · NixOS/nixpkgs · GitHub

You’re right there is a file in there that contains the settings I have been looking for. But then what is the file for that gets passed with the -c parameter?

that’s done since phpfpm: add option for setting php.ini file · NixOS/nixpkgs@35df71a · GitHub and if I understand it correct then phpfpm otherwise doesn’t load those settings.