PHP: Difference between revisions

imported>JasonWoof
show how to configure apache to use your php version/settings/plugins
imported>JasonWoof
explain configuring extensions without apache too
Line 21: Line 21:
     php
     php
   ];
   ];
</syntaxhighlight>
== Setting custom plugins and php.ini configurations ==
In this example we install the [[xdebug]] extension, and add a php.ini directive to enable it.
<syntaxhighlight lang="nix>
environment.systemPackages = [
  (pkgs.php.buildEnv {
    extensions = ({ enabled, all }: enabled ++ (with all; [
      xdebug
    ]));
    extraConfig = ''
      xdebug.mode=debug
    '';
  })
</syntaxhighlight>
</syntaxhighlight>




== Apache, plugins, settings ==
== Apache, plugins, settings ==
Here's how to configure Apache to use a particular PHP configuration/version/etc


<syntaxhighlight lang="nix>
<syntaxhighlight lang="nix>