From 8084d958106ac2484d631d237ea3420ddc1b3aa4 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 11 Apr 2026 18:05:11 +0000 Subject: [PATCH] Check for zip installation in CLI context --- app/call_recordings/app_defaults.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/call_recordings/app_defaults.php b/app/call_recordings/app_defaults.php index 5ccae9831..3ebe4e64d 100644 --- a/app/call_recordings/app_defaults.php +++ b/app/call_recordings/app_defaults.php @@ -3,11 +3,13 @@ if ($domains_processed == 1) { // Prompt to Install Zip - $ffmpeg_path = shell_exec('which zip'); - if (empty($ffmpeg_path)) { - echo "Please install zip\n"; - echo "On Debian / Ubuntu Linux install zip with this command.\n"; - echo "apt install zip\n"; + if (PHP_SAPI === 'cli') { + $ffmpeg_path = shell_exec('which zip'); + if (empty($ffmpeg_path)) { + echo "Please install zip\n"; + echo "On Debian / Ubuntu Linux install zip with this command.\n"; + echo "apt install zip\n"; + } } // Load the email template