mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 15:14:35 -04: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)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
|
|
||||||
info("key login = " . $request->segment(3));
|
|
||||||
|
|
||||||
if ($request->segment(3) && config('ninja.db.multi_db_enabled')) {
|
if ($request->segment(3) && config('ninja.db.multi_db_enabled')) {
|
||||||
|
|
||||||
if (MultiDB::findAndSetDbByContactKey($request->segment(3))) {
|
if (MultiDB::findAndSetDbByContactKey($request->segment(3))) {
|
||||||
|
@ -66,6 +66,7 @@ class SystemHealth
|
|||||||
'php_version' => [
|
'php_version' => [
|
||||||
'minimum_php_version' => (string) self::$php_version,
|
'minimum_php_version' => (string) self::$php_version,
|
||||||
'current_php_version' => phpversion(),
|
'current_php_version' => phpversion(),
|
||||||
|
'current_php_cli_version' => (string) self::checkPhpCli(),
|
||||||
'is_okay' => version_compare(phpversion(), self::$php_version, '>='),
|
'is_okay' => version_compare(phpversion(), self::$php_version, '>='),
|
||||||
],
|
],
|
||||||
'env_writable' => self::checkEnvWritable(),
|
'env_writable' => self::checkEnvWritable(),
|
||||||
@ -116,6 +117,21 @@ class SystemHealth
|
|||||||
return $result;
|
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
|
private static function extensions() :array
|
||||||
{
|
{
|
||||||
$loaded_extensions = [];
|
$loaded_extensions = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user