public static function isPhpCgiType() { $sapiType = php_sapi_name(); return substr($sapiType, 0, 3) === 'cgi'; }
private function checkCompatibility() { if (Common::isPhpCgiType()) { echo 'Piwik Console is known to be not compatible with PHP-CGI (you are using ' . php_sapi_name() . '). ' . 'Please execute console using PHP-CLI. For instance "/usr/bin/php-cli console ..."'; echo "\n"; exit(1); } }