diff --git a/app/Http/Middleware/ContactKeyLogin.php b/app/Http/Middleware/ContactKeyLogin.php index 91bff79ceb..120c03d730 100644 --- a/app/Http/Middleware/ContactKeyLogin.php +++ b/app/Http/Middleware/ContactKeyLogin.php @@ -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))) { diff --git a/app/Utils/SystemHealth.php b/app/Utils/SystemHealth.php index 5a31ea9ab0..4c7814bbaa 100644 --- a/app/Utils/SystemHealth.php +++ b/app/Utils/SystemHealth.php @@ -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 = [];