我有一台配有Nginx和phpfpm的NixOS机器。我无法想象如何在php.ini中设置一个值。
我试着这样做:
services.phpfpm.phpIni = pkgs.runCommand "php.ini" {
options = ''
sendmail_path = "/run/wrappers/bin/sendmail -t -i"
'';
} ''
cat ${pkgs.php}/etc/php-recommended.ini > $out
echo "$options" >> $out
'';
但是我收到以下消息,文件保持不变:
warning: The option definition `services.phpfpm.phpIni' in
`configuration.nix' no longer has any effect; please remove it.
还有其他方法吗?
答案 0 :(得分:1)
根据@ Zimm-i48的建议,您可以使用services.phpfpm.phpOptions
配置选项更改php设置:
services.phpfpm.phpOptions = ''
extension=${apcu}/lib/php/extensions/apcu.so
apc.stat = '0'
apc.slam_defense = '0'
etc...
'';