php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43724 element 'HTTPS' does not work.
Submitted: 2008-01-02 02:55 UTC Modified: 2008-01-02 12:42 UTC
From: caodingpeng at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.5 OS: windows XP sp2
Private report: No CVE-ID: None
 [2008-01-02 02:55 UTC] caodingpeng at gmail dot com
Description:
------------
in the doc file, it says:
reserverd variable $_SERVER has "HTTPS" element,but when i use it ,it does not work.


Reproduce code:
---------------
echo $_SERVER["HTTPS"]

Expected result:
----------------
should be the same with php doc:
'HTTPS'
Set to a non-empty value if the script was queried through the HTTPS protocol. 
Note that when using ISAPI with IIS, the value will be off if the request was not made through the HTTPS protocol. 

Actual result:
--------------
Notice: Undefined index: HTTPS

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-02 12:42 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

That variable is set by some webserver when SSL is activated, not by all. PHP just offers what the server provides.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Fri May 01 17:00:01 2026 UTC