diff --git a/lib/classes/task/Scheduler.php b/lib/classes/task/Scheduler.php index 887ce5378c..c775f809e9 100644 --- a/lib/classes/task/Scheduler.php +++ b/lib/classes/task/Scheduler.php @@ -67,11 +67,11 @@ class task_Scheduler $php = $this->dependencyContainer['phraseanet.configuration']['binaries']['php_binary']; } else { $finder = new ExecutableFinder(); - $php = $finder->find($php); + $php = $finder->find('php'); } if ( ! is_executable($php)) { - throw new \RuntimeException('PHP cli is not provided in registry'); + throw new \RuntimeException('PHP cli is not provided in binary configuration'); } $this->method = self::METHOD_PROC_OPEN; diff --git a/lib/classes/task/manager.php b/lib/classes/task/manager.php index 3188528379..a88ead99d6 100644 --- a/lib/classes/task/manager.php +++ b/lib/classes/task/manager.php @@ -11,6 +11,7 @@ use Monolog\Logger; use Alchemy\Phrasea\Application; +use Symfony\Component\Process\ExecutableFinder; use Symfony\Component\Process\Process; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -131,7 +132,7 @@ class task_manager $php = $this->app['phraseanet.configuration']['binaries']['php_binary']; } else { $finder = new ExecutableFinder(); - $php = $finder->find($php); + $php = $finder->find('php'); } $cmd = $php . ' -f ' . $this->app['root.path'] . "/bin/console scheduler:start";