No $_SERVER["HTTPS"] available

Problems with the Windows version of XAMPP, questions, comments, and anything related.

No $_SERVER["HTTPS"] available

Postby The Dragon » 17. June 2006 13:11

Hello,

since I installed the new xampp version (1.53) the server variable
$_SERVER["HTTPS"] ist empty :?:
The option "LoadModule ssl_module modules/mod_ssl.so" in the httpd.conf file is set.

Greetings

The Dragon
The Dragon
 
Posts: 2
Joined: 17. June 2006 09:39

Postby Wiedmann » 17. June 2006 13:43

How did you test this?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby The Dragon » 17. June 2006 15:32

my testfile looks like this:
<?php
echo $_SERVER["HTTPS"];
echo '<pre>';
print_r($_SERVER);
echo '</pre>';
?>


I have a loginpage from which I redirect to https://mypage if the site is not called via https.
if($_SERVER["HTTPS"]!='on')
{
$url='https://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
echo '<h1>Sie werden auf eine sichere Verbindung umgeleitet, bitte akzeptieren sie das Zertifikat</h1>';
echo '<meta http-equiv="refresh" content="0 URL='.$url.'">';
}

If the HTTPS-variable is empty, the redirect fails. I suppose the SSL-Support is not included in the correct way, although phpinfo says SSL-Support is enabled?
The Dragon
 
Posts: 2
Joined: 17. June 2006 09:39

Postby Wiedmann » 17. June 2006 19:15

my testfile looks like this:
Code: Select all
<?php
   echo $_SERVER["HTTPS"];
   echo '<pre>';
   print_r($_SERVER);
   echo '</pre>';
?>

And you access this script via HTTPS (eg: "https://localhost/test.php") and there is nothing in "$_SERVER['HTTPS']"?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 62 guests