Checkout Redirect Loop when HTTPS Environment Variable is not Set

Summary

When using a payment gateway that requires SSL; upon moving to checkout the browser is stuck in a redirect loop.

Potential Errors

You may receive an error similar to:

FireFox:

The page isn't loading properly.
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

Google Chrome:

This webpage has a redirect loop
ERR_TOO_MANY_REDIRECTS

Safari:

Too many redirects occurred trying to open “https://example.com/checkout/”. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page.

Internet Explorer:

Cannot display the web page.

note: Some versions of Internet Explorer will continuously loop without displaying error

Known Cause

Some hosting environments do not declare that they are running securely in a standard way (or at all in some cases). This will cause issues with the is_ssl() to not be set properly. Shopp see’s that SSL is required and then checks for SSL. If is_ssl() is not set, Shopp will attempt to redirect to HTTPS. Thus creating a loop.

Known Fix

The current “proper” workaround for this is adding the following to your wp-config.php:

$_SERVER['HTTPS'] = $_SERVER['SSL'];

note: wp-config.php is located in the base directory of your WordPress installation.

This will allow is_ssl() to work properly. The need for this particular fix is due to some circumstances where is_ssl() is called before hooks are available.

See Also

Checkout Redirect Loop when HTTPS Environment Variable is not Set
  • 0.00 / 5 5
  1. This did not work for me.

    July 22nd   #

  2. This did not work for me either.

    September 18th   #

  3. This fixed my issue after installing the ssl ticked. My site would not resolve requests to HTTPS.

    November 29th   #

  4. Apparently you can add this to the vhost config file for your site:

    fastcgi_param HTTPS on;

    But I solved it by using Mavis HTTP redirect plugin and specifying ‘checkout,confirm-order,thanks’ in the plugins setup page.

    December 15th   #

  5. Avatar of Levi

    It did not work for me either

    December 20th   #

  6. Avatar of Chris Jumonville

    Doesn’t work!

    July 18th   #

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar