PHP: Difference between revisions

imported>Jasoncarr0
mNo edit summary
imported>JasonWoof
show how to configure apache to use your php version/settings/plugins
Line 8: Line 8:


See <code>nix search php</code> (<code>nix search nixpkgs php</code> with [[Flakes]]) for additional versions like <code>php74</code>, etc.
See <code>nix search php</code> (<code>nix search nixpkgs php</code> with [[Flakes]]) for additional versions like <code>php74</code>, etc.


== Setting custom php.ini configurations ==
== Setting custom php.ini configurations ==
Line 20: Line 21:
     php
     php
   ];
   ];
</syntaxhighlight>
== Apache, plugins, settings ==
<syntaxhighlight lang="nix>
# in /etc/nixos/configuration.nix (not inside systemPackages)
services.httpd.phpPackage = pkgs.php.buildEnv {
    extensions = ({ enabled, all }: enabled ++ (with all; [
        xdebug
    ]));
    extraConfig = ''
        xdebug.mode=debug
    '';
};
</syntaxhighlight>
</syntaxhighlight>