mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
PHP Cli version
This commit is contained in:
parent
c59e6a2141
commit
2627ec8894
@ -29,8 +29,6 @@ class ContactKeyLogin
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
|
||||
info("key login = " . $request->segment(3));
|
||||
|
||||
if ($request->segment(3) && config('ninja.db.multi_db_enabled')) {
|
||||
|
||||
if (MultiDB::findAndSetDbByContactKey($request->segment(3))) {
|
||||
|
@ -66,6 +66,7 @@ class SystemHealth
|
||||
'php_version' => [
|
||||
'minimum_php_version' => (string) self::$php_version,
|
||||
'current_php_version' => phpversion(),
|
||||
'current_php_cli_version' => (string) self::checkPhpCli(),
|
||||
'is_okay' => version_compare(phpversion(), self::$php_version, '>='),
|
||||
],
|
||||
'env_writable' => self::checkEnvWritable(),
|
||||
@ -116,6 +117,21 @@ class SystemHealth
|
||||
return $result;
|
||||
}
|
||||
|
||||
private static function checkPhpCli()
|
||||
{
|
||||
|
||||
try {
|
||||
exec('php -v', $foo, $exitCode);
|
||||
|
||||
if ($exitCode === 0) {
|
||||
return empty($foo[0]) ? 'Found php cli, but no version information' : $foo[0];
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static function extensions() :array
|
||||
{
|
||||
$loaded_extensions = [];
|
||||
|
Loading…
Reference in New Issue
Block a user