something wrong with $_SERVER var

From: Date: Tue, 05 Oct 2004 01:18:07 +0000
Subject: something wrong with $_SERVER var
Groups: php.general 
Request: Send a blank email to php-general+get-198630@lists.php.net to get a copy of this message
Hi there, I am experiencing a strange behaviour with $_SERVER vars. Somehow the var: $_SERVER[SERVER_PORT] seems to be 443 even if it is 80. I had following statement inside my app: if ($_SERVER[SERVER_PORT] == '443' AND !$SSL){ header("Location:http://".$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI]); exit; } This was to redirect ssl url to standard protocol (due to relative links on the page). Some users with IE could not load any pages anymore (ssl was disabled). The normal url was not loadable and only a white screen showed up. Did not happen with firefox most of the time. But why?? The server port was not 443 so the statemetn could never become true?! Any ideas? I am lost :-( Merlin

« previous php.general (#198630) next »