Fix php detection

This commit is contained in:
Nicolas Le Goff
2013-06-27 16:24:27 +02:00
parent 11f78307d9
commit 4fa166c846
2 changed files with 4 additions and 3 deletions

View File

@@ -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;

View File

@@ -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";