mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 19:43:16 +00:00
Fix php detection
This commit is contained in:
@@ -67,11 +67,11 @@ class task_Scheduler
|
|||||||
$php = $this->dependencyContainer['phraseanet.configuration']['binaries']['php_binary'];
|
$php = $this->dependencyContainer['phraseanet.configuration']['binaries']['php_binary'];
|
||||||
} else {
|
} else {
|
||||||
$finder = new ExecutableFinder();
|
$finder = new ExecutableFinder();
|
||||||
$php = $finder->find($php);
|
$php = $finder->find('php');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! is_executable($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;
|
$this->method = self::METHOD_PROC_OPEN;
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
use Alchemy\Phrasea\Application;
|
use Alchemy\Phrasea\Application;
|
||||||
|
use Symfony\Component\Process\ExecutableFinder;
|
||||||
use Symfony\Component\Process\Process;
|
use Symfony\Component\Process\Process;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
|
|
||||||
@@ -131,7 +132,7 @@ class task_manager
|
|||||||
$php = $this->app['phraseanet.configuration']['binaries']['php_binary'];
|
$php = $this->app['phraseanet.configuration']['binaries']['php_binary'];
|
||||||
} else {
|
} else {
|
||||||
$finder = new ExecutableFinder();
|
$finder = new ExecutableFinder();
|
||||||
$php = $finder->find($php);
|
$php = $finder->find('php');
|
||||||
}
|
}
|
||||||
|
|
||||||
$cmd = $php . ' -f ' . $this->app['root.path'] . "/bin/console scheduler:start";
|
$cmd = $php . ' -f ' . $this->app['root.path'] . "/bin/console scheduler:start";
|
||||||
|
Reference in New Issue
Block a user