Help - Search - Members - Calendar
Full Version: Problem: https redirect loop doesn't end
CubeCart Forums > CubeCart Version 3 > Installation & Upgrade Help (Version 3)
eknudtson
Hello all! I've successfully installed cubecart and got everything working perfect, minus one step: the SSL and HTTPS connection. After I installed the SSL Certificate on my server, and then configured the HTTPS stuff in cubecart, the store works fine, but the admin panel is inaccessable.

Following these links:

http://shop.mydomain.com/admin/
or
https://shop.mydomain.com/admin/

leads to:
https://shop.mydomain.com//////////////////...er=&ccUser=

and firefox tells me:

QUOTE
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
* This problem can sometimes be caused by disabling or refusing to accept cookies.


perhaps my https connection / configuration is incorrect? Does anyone have any insights for me?
Thanks in advance for any help,
Eric
techbuzz
QUOTE(eknudtson @ Jan 16 2007, 06:23 AM) *
Hello all! I've successfully installed cubecart and got everything working perfect, minus one step: the SSL and HTTPS connection. After I installed the SSL Certificate on my server, and then configured the HTTPS stuff in cubecart, the store works fine, but the admin panel is inaccessable.

...and firefox tells me:

QUOTE
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
* This problem can sometimes be caused by disabling or refusing to accept cookies.


perhaps my https connection / configuration is incorrect? Does anyone have any insights for me?
Thanks in advance for any help,
Eric


I'm having the same problem with the &ccUser repeating over and over and the Redirecting error message. There are a couple of older threads on here with users experiencing same problem, but I haven't seen a resolution.

This happens admin and on customer site when SSL is enabled. I'm pretty sure I have the URL's correct with /store/ (location of my store) and https://(full shared ssl url)/store... especially given that using my shared ssl URL I can successfully browse non cubecart pages of my site with https:// Also, if I truncate the url back to what it appears it should be, the page reloads fine, but problems comes back up when a new link is clicked.

I'm using a shared SSL certificate at the moment. Would love to get that to work since it is free... maybe someone else here will have some insight.
techbuzz
some help:
https://www.cubecart.com/site/helpdesk/inde...0&nav=0,2,4

testing my site now.
techbuzz
QUOTE(techbuzz @ Jan 23 2007, 04:35 AM) *


Here's the knowledge base article:

QUOTE
My cart goes into an infinite loop with SSL enabled?!
Solution SSL in CubeCart works by detecting if the current page is in SSL mode or not and if it needs to be.

If the current page is not in SSL mode and it needs to be CubeCart will redirect automatically to the secure page. Once it has redirected it will look again to make sure it is now in SSL mode.

In order for it to do this CubeCart needs to look for certain server environment value. The following function is in the CubeCart code to do this. It can be found in /includes/functions.inc.php

function detectSSL(){

if($_SERVER["HTTPS"] == "on"){

return TRUE;

} elseif ($_SERVER["HTTPS"] == 1){

return TRUE;

} elseif ($_SERVER['SERVER_PORT'] == 443) {

return TRUE;

} else {

return FALSE;

}

}

As a result of this the server has to broadcast either $_SERVER['SERVER_PORT'] or $_SERVER["HTTPS"] for CubeCart to work under SSL.

If your hosting environment doesn't do this then CubeCart will go into an infinite loop as it cant see when it is under SSL.

To check if your server broadcasts this please upload a file called sslcheck.php with the content:

echo "

";

print_r($_SERVER);

echo "

";
?>

This will list all the server environment variables available. Please run this script in both standard http or https protocol.

e.g. http://www.example.com/sslcheck.php and https://www.example.com/sslcheck.php

Please compare the two. If neither of $_SERVER['SERVER_PORT'] or $_SERVER["HTTPS"] are present under SSL then CubeCart will not currently work with your hosting environment with SSL enabled.



Well, in my case it appears my host does indeed meet the requirements above since from the shared ssl url it broadcasts back both ' [HTTPS] => on ' and ' [SERVER_PORT] => 443 '.

Not sure where to go from here.
eknudtson
techbuzz, I am still having the same problem as well! I checked the variables and both of the $_SERVER["HTTPS"] and $_SERVER['SERVER_PORT'] are available and functioning perfectly. It must be something else, I am investigating....

huh.gif
techbuzz
QUOTE(eknudtson @ Jan 23 2007, 11:32 AM) *
techbuzz, I am still having the same problem as well! I checked the variables and both of the $_SERVER["HTTPS"] and $_SERVER['SERVER_PORT'] are available and functioning perfectly. It must be something else, I am investigating....


Well, I PARTIALLY fixed this. I got a RapidSSL cert for https://mydomain.com HOWEVER, I still get this error in Firefox (v2). In IE6 everything works great, but with Firefox, about 50% of the time I get the "The page isn't redirecting properly" error. If I hit Try Again or just hit enter on the URL, it might or might not work, 50/50 shot again. Very strange that it is an intermittent problem and that the same URL can give the error one second and moments later load the page fine. (edit: testing w/ Firefox on two separate computers, tried clearing cookies & cache multiple times, restarting browser w/ no cookies and clean cache, etc)

The URL's all appear to be correct. There is none of the &ccUser repetition going on as before in either IE or Firefox. Only happens on the https pages. At a loss as to next step since I thought my shared SSL was the issue. I'm hosted with Media Temple.

Let me know if you come up with anything. Anyone else in a similar predicament? unsure.gif
techbuzz
Another interesting behavior difference between IE6 and Firefox2 --> When going back to the homepage or product/category pages from the SSL enabled cart, IE properly switches back to http from https, but Firefox stays at https and remains that way for further shop browsing, regardless of if in the cart or not.

Fine starting out as http browsing nonencrypted pages, but once I enter the cart and go SSL in the cart, Firefox stays that way. All good in IE though... odd.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.