php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #40031 $_SERVER['HTTPS'] never empty on IIS
Submitted: 2007-01-05 13:37 UTC Modified: 2007-01-22 03:04 UTC
From: matteo at beccati dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.2.0 OS: Windows 2003 Server
Private report: No CVE-ID: None
 [2007-01-05 13:37 UTC] matteo at beccati dot com
Description:
------------
When using isapi with IIS6 the variable seems to be always set to either "on" or "off", but the manual states that $_SERVER['HTTPS'] has a non-empty value when SSL is enabled (true on Apache, but either wrong or misleading) 

Feel free to mark this bug as a documentation problem: I don't know if it's really a wrong behaviour of php-isapi.

Also replicated on IIS5.1/WinXP Pro

Reproduce code:
---------------
var_dump($_SERVER['HTTPS']);

Expected result:
----------------
NULL

Actual result:
--------------
string(3) "off"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-05 15:15 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

The HTTPS var comes from IIS, PHP imports it along with other 
server variables.
 [2007-01-05 15:41 UTC] matteo at beccati dot com
I beg to differ, that's why I've reopened the report and marked it as "Documentation problem".

As an open source developer, how am I supposed to test every possible environment for so tiny differences if a standard seems to be clearly reported on the manual?

'HTTPS'
Set to a non-empty value if the script was queried through the HTTPS protocol.

Which is correct when using Apache and wrong when using IIS/ISAPI. IMHO this deserves at least a note.

Of course, if you prefer, I could write a patch for the ISAPI sapi to make the behaviour consistent with Apache.
 [2007-01-22 03:04 UTC] didou@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Aug 10 17:00:03 2025 UTC