From 7e3871d56a3947aae50f81e29c457d80d7d6d563 Mon Sep 17 00:00:00 2001 From: Evan-Paillard Date: Wed, 1 Oct 2025 15:51:56 +0200 Subject: [PATCH 1/2] add log for php --- tasks/configure.yml | 7 +++++++ templates/php.ini.j2 | 1 + 2 files changed, 8 insertions(+) diff --git a/tasks/configure.yml b/tasks/configure.yml index 0e812a96..feeb87d7 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -19,3 +19,10 @@ with_items: "{{ php_conf_paths }}" notify: Restart webserver when: php_use_managed_ini + +- name: Give permissions to php8.2-fpm.log + file: + path: /var/log/php-fpm.log + owner: "{{ __php_fpm_pool_user }}" + group: "{{ __php_fpm_pool_group }}" + mode: 0664 diff --git a/templates/php.ini.j2 b/templates/php.ini.j2 index 8cabc458..e2fc079e 100644 --- a/templates/php.ini.j2 +++ b/templates/php.ini.j2 @@ -42,6 +42,7 @@ error_reporting = {{ php_error_reporting }} display_errors = {{ php_display_errors }} display_startup_errors = {{ php_display_startup_errors }} log_errors = On +error_log = /var/log/php-fpm.log log_errors_max_len = 1024 ignore_repeated_errors = Off ignore_repeated_source = Off From 144a3e7362e16d5fa0a6b6df813765bb5e7b32c2 Mon Sep 17 00:00:00 2001 From: Evan-Paillard Date: Wed, 1 Oct 2025 15:53:19 +0200 Subject: [PATCH 2/2] fix name in task --- tasks/configure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index feeb87d7..23832116 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -20,7 +20,7 @@ notify: Restart webserver when: php_use_managed_ini -- name: Give permissions to php8.2-fpm.log +- name: Give permissions to php-fpm.log file: path: /var/log/php-fpm.log owner: "{{ __php_fpm_pool_user }}"