PHP: Difference between revisions
imported>JasonWoof explain configuring extensions without apache too |
imported>Onny Add notes on configuring php-fpm |
||
| Line 10: | Line 10: | ||
== Setting custom php.ini configurations == | == Configuration == | ||
==== Setting custom php.ini configurations === | |||
The `buildEnv` attribute on php can add extra configuration options. For instance, to set a memory_limit in the NixOS configuration.nix: | The `buildEnv` attribute on php can add extra configuration options. For instance, to set a memory_limit in the NixOS configuration.nix: | ||
| Line 23: | Line 25: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Setting custom plugins and php.ini configurations == | In case of using php-fpm, the following example enables error reporting. Use this only in development environments | ||
<syntaxhighlight lang="nix> | |||
services.phpfpm.phpOptions = '' | |||
display_errors = on; | |||
''; | |||
</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. | In this example we install the [[xdebug]] extension, and add a php.ini directive to enable it. | ||