Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

This webpage has a redirect loop (ERR_TOO_MANY_REDIRECTS)

We have a site that is not working in Google Chrome V44. It works well in IE and Firefox. All of sudden after updating chrome browser to V44, we unable to login to the system and just receiving this problem. We're trying to figure out as why this is happening. We have 2 instances of our system in our server. Our live site is the one that is not working in Chrome V44 while the other - our demo site is fine. The only difference of the these sites is that our live has SSL. So our first impression is that there's a problem with Chrome V44 with our site with certificate.

I think Chrome can't establish secure connection with the site.

Has anyone experienced this issue?

Please help. Thanks.

like image 882
Sharon Babaran Avatar asked Oct 31 '22 23:10

Sharon Babaran


1 Answers

This is due to a SSL in Chrome V44 where it incorrectly sends a HTTP_HTTPS header to be set, however the HTTPS header is still set correctly. It has been quite widely reported: http://www.zdnet.com/article/brand-new-chrome-44-release-added-a-bug/ https://ma.ttias.be/chrome-44-sending-https-header-by-mistake-breaking-web-applications-everywhere/

In order to stop this, in PHP, I added the following to the very top of my index.php file:

<?php
if (!isset($_SERVER['HTTPS'])) {
        $_SERVER['HTTP_HTTPS'] = 0;
}
?>

Ensuring there is no space between the ?> and the next

like image 143
mjsa Avatar answered Jan 04 '23 14:01

mjsa