From b0c562900188618a705b52444022f3f1b43c00d3 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Tue, 2 Jan 2024 08:45:42 +0100 Subject: nixos/nextcloud: disable output buffering The Nextcloud admin guide says that output buffering must be turned off or otherwise PHP will return memory-related errors [1]. As the default value for this PHP setting is 4096 and thus enabled the Nextcloud setup is thus misconfigured by default. This misconfiguration will be shown in the "Security & setup warnings" dialog for the administrator. Fix this misconfiguration by setting "output_buffering=0" by default. [1]: https://docs.nextcloud.com/server/stable/admin_manual/configuration_files/big_file_upload_configuration.html#configuring-php (cherry picked from commit f026ea0db01edbeb59137d1c927c07f48c0edfb5) --- nixos/modules/services/web-apps/nextcloud.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'nixos') diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 9c6fd57e08378..3c4bcfb60c46a 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -9,6 +9,7 @@ let jsonFormat = pkgs.formats.json {}; defaultPHPSettings = { + output_buffering = "0"; short_open_tag = "Off"; expose_php = "Off"; error_reporting = "E_ALL & ~E_DEPRECATED & ~E_STRICT"; -- cgit 1.4.1