diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php
index a7f40214a4a46740b98e6f9a99fd2c5e87088a00..24eac74248954fdd50c669b22e4f0cfd609a9acb 100644
--- a/ecrire/inc/utils.php
+++ b/ecrire/inc/utils.php
@@ -2725,7 +2725,6 @@ function spip_initialisation_core($pi = null, $pa = null, $ti = null, $ta = null
 	$GLOBALS['flag_ob'] = (function_exists('ob_start')
 		&& function_exists('ini_get')
 		&& !strstr(@ini_get('disable_functions'), 'ob_'));
-	$GLOBALS['flag_sapi_name'] = function_exists('php_sapi_name');
 	$GLOBALS['flag_get_cfg_var'] = (@get_cfg_var('error_reporting') != '');
 	$GLOBALS['flag_upload'] = (!$GLOBALS['flag_get_cfg_var'] ||
 		(get_cfg_var('upload_max_filesize') > 0));
diff --git a/prive/formulaires/login.php b/prive/formulaires/login.php
index 49b8b07df5c593e1277152fb44bf7b7a9f8b4c37..4cf1551f06b9ff9f0431669e9a39f2a1e7777e01 100644
--- a/prive/formulaires/login.php
+++ b/prive/formulaires/login.php
@@ -183,7 +183,7 @@ function login_auth_http() {
 		!$GLOBALS['ignore_auth_http']
 		and _request('var_erreur') == 'cookie'
 		and (!isset($_COOKIE['spip_session']) or $_COOKIE['spip_session'] != 'test_echec_cookie')
-		and (($GLOBALS['flag_sapi_name'] and preg_match(',apache,i', @php_sapi_name()))
+		and (preg_match(',apache,i', php_sapi_name())
 			or preg_match(',^Apache.* PHP,', $_SERVER['SERVER_SOFTWARE']))
 		// Attention dans le cas 'intranet' la proposition de se loger
 		// par auth_http peut conduire a l'echec.