From f026ea0db01edbeb59137d1c927c07f48c0edfb5 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Tue, 2 Jan 2024 08:45:42 +0100 Subject: [PATCH] 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 --- nixos/modules/services/web-apps/nextcloud.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 32de50d08933..15da41c236ab 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";