Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SSL too many redirects


FlagShipper

Recommended Posts

I got SSL hooked up on my site, mostly, but have a few hiccups. The main one being I can no longer log into my admin page! My phone has been saying ERR_TOO_MANY_REDIRECTS  since I started with SSL but it would load fine on my laptop but just now I'm getting the same error on my laptop as well and haven't changed anything since it was working fine 10 minutes ago. I tried with firefox and chrome, cleared cookies and still nothing. I'd love for it to work on my phone but not sure what settings I need to change, as I had scoured around the forum to change the config until I found one that would load it without everything being broken. I'm using 2.3.4BS

Nothing is showing up in the error_log, this is the /admin/includes/config

<?php
  define('HTTP_SERVER', 'https://website.com');
  define('HTTPS_SERVER', 'https://website.com');
  define('ENABLE_SSL', true);
  define('HTTP_COOKIE_DOMAIN', 'https://website.com');
  define('HTTPS_COOKIE_DOMAIN', 'https://website.com');
  define('HTTP_COOKIE_PATH', '/admin');
  define('HTTPS_COOKIE_PATH', '/admin');
  define('HTTP_CATALOG_SERVER', 'https://website.com');
  define('HTTPS_CATALOG_SERVER', 'https://website.com');
  define('ENABLE_SSL_CATALOG', 'true');
  define('DIR_FS_DOCUMENT_ROOT', '/home/username/domains/website.com/public_htm/');
  define('DIR_WS_ADMIN', '/admin/');
  define('DIR_WS_HTTPS_ADMIN', '/admin/');
  define('DIR_FS_ADMIN', '/home/username/domains/website.com/public_html/admin/');
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');
  define('DIR_FS_CATALOG', '/home/username/domains/website.com/public_html/');
  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
  define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
  define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
  define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
  define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
  define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', 'username');
  define('DB_SERVER_PASSWORD', 'password');
  define('DB_DATABASE', 'database');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'mysql');
  define('CFG_TIME_ZONE', 'America/Chicago');
?>

I wasn't sure if it was an .htaccess issue so turned it off but no change

Link to comment
Share on other sites

At least 3 errors there.

define('HTTP_COOKIE_DOMAIN', 'https://website.com');
define('HTTPS_COOKIE_DOMAIN', 'https://website.com');

to

define('HTTP_COOKIE_DOMAIN', '.website.com');
define('HTTPS_COOKIE_DOMAIN', '.website.com');

define('DIR_FS_DOCUMENT_ROOT', '/home/username/domains/website.com/public_htm/');

to

define('DIR_FS_DOCUMENT_ROOT', '/home/username/domains/website.com/public_html/');

Correcting those will get you a little further.

Link to comment
Share on other sites

  • 7 months later...

In my case, the many redirects problem was due to a wrong cookie path set in configure.php. The correct one should be:

Quote

  const COOKIE_OPTIONS = [
    'lifetime' => 0,
    'domain' => 'yourdomain.com',
    'path' => '/admin/',               // path must have a trailing slash, somehow it was missing during installation
    'samesite' => 'Lax',
  ];

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...