PHP: Difference between revisions

imported>Drupol
No edit summary
imported>Tamiyo
Line 209: Line 209:
   };
   };
};
};
</syntaxhighlight>
== Troubleshooting ==
=== Memcached Extension Isn't Enabled ===
Using <code>phpExtensions.memcached</code> inside of <code>environment.systemPackages</code> will lead to the memcached php extension not being enabled in the <code>php.ini</code> file. Here's how to fix it:
<syntaxhighlight lang="nix>
let
  # Replace pkgs.php with the php version you want; ex pkgs.php83
  php = pkgs.php.buildEnv {
    extensions = { enabled, all }: enabled ++ (with all; [ memcached ]);
  };
in {
  environment.systemPackages = with pkgs; [ php ];
}
</syntaxhighlight>
</syntaxhighlight>