|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46545 get_headers() has problems when get redirected from http to https
Submitted: 2008-11-11 15:59 UTC Modified: 2008-11-11 20:38 UTC
From: matthias at pc-intern dot com Assigned:
Status: Closed Package: HTTP related
PHP Version: 5.2CVS-2008-11-11 (CVS) OS: Debian Etch, PHP 5.2.0-8+etch11
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: matthias at pc-intern dot com
New email:
PHP Version: OS:


 [2008-11-11 15:59 UTC] matthias at pc-intern dot com
If you check an HTTP URL with get_headers() function which redirects to another HTTPS URL, NULL will returned. If the redirect-HTTPS-URL is checked directly, there is no error. extension=php_openssl.dll is enabled.

Reproduce code:
works: get_headers('');
works: get_headers('');
don't work: get_headers('');

Expected result:
array (HEADERS);
There should be no problem when a HTTP URL redirectes to an HTTPS URL

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-11 18:01 UTC] matthias at pc-intern dot com
btw: works, too: get_headers('');
 [2008-11-11 18:45 UTC]
Please try using this CVS snapshot:
For Windows:

 [2008-11-11 20:38 UTC] matthias at pc-intern dot com
I updated and now it works, thx!
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Sep 18 18:01:26 2020 UTC