From 35e5a7d69b04bef171ed30b2f31aad32b83b19f0 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 12 Jun 2009 15:58:34 +0800 Subject: Add /usr/local/bin to PATH before trying to detect binaries. Signed-off-by: --- modules/gallery/helpers/graphics.php | 1 + modules/gallery/helpers/movie.php | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 25eb0891..feebfb34 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -326,6 +326,7 @@ class graphics_Core { if (!isset($gd["GD Version"])) { $gd["GD Version"] = false; } + putenv("PATH=" . getenv("PATH") . ":/usr/local/bin"); return array("gd" => $gd, "imagemagick" => $exec ? dirname(exec("which convert")) : false, "graphicsmagick" => $exec ? dirname(exec("which gm")) : false); diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php index 986d5f62..1d1d29d1 100644 --- a/modules/gallery/helpers/movie.php +++ b/modules/gallery/helpers/movie.php @@ -140,13 +140,11 @@ class movie_Core { static function find_ffmpeg() { if (!$ffmpeg_path = module::get_var("gallery", "ffmpeg_path")) { + putenv("PATH=" . getenv("PATH") . ":/usr/local/bin"); if (function_exists("exec")) { $ffmpeg_path = exec("which ffmpeg"); } - if (empty($ffmpeg) && @file_exists("/usr/local/bin/ffmpeg")) { - $ffmpeg_path = "/usr/local/bin/ffmpeg"; - } module::set_var("gallery", "ffmpeg_path", $ffmpeg_path); } return $ffmpeg_path; -- cgit v1.2.3