AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: gswan on June 16, 2017, 10:01:34 PM

Title: Admin timeout login URL HTTPS_SERVER
Post by: gswan on June 16, 2017, 10:01:34 PM
Hi,
I am using abantecart 1.2.8, php-5.6.30.

After leaving the admin console to timeout it appears to redirect to the admin login page, however it has the string "HTTPS_SERVER" in the URL.
If I manually remove the string I get the admin login page.
Example: HTTPS_SERVERindex.php?rt=index/

The server URL's are configured and SSL is enabled in the settings. Is there anywhere else I should be looking for where this comes from?
Title: Re: Admin timeout login URL HTTPS_SERVER
Post by: eCommerce Core on June 18, 2017, 09:46:22 PM
This looks like some misconfiguration on your web server. Check Apache settings or contact your hosting company.
Title: Re: Admin timeout login URL HTTPS_SERVER
Post by: gswan on June 26, 2017, 11:12:20 PM
Checked apache settings and .htaccess rewrite rules. Nothing there.
It looks more like a string coming from PHP, where HTTPS_SERVER is supposed to be defined somewhere, but isn't.


Title: Re: Admin timeout login URL HTTPS_SERVER
Post by: abolabo on June 27, 2017, 05:09:33 AM
Hello.
The better way to solve it is upgrading up to 1.2.10 version.
AbanteCart becomes more stable version-by-version.
Title: Re: Admin timeout login URL HTTPS_SERVER
Post by: gswan on October 10, 2017, 10:49:30 PM
I ended up finding this in the code (html.php), and there does not appear to be any check to see if HTTPS_SERVER is actually defined.

               
public function getURL($rt, $params = '', $encode = '') {
      if (isset($this->registry->get('request')->server['HTTPS'])
            && (($this->registry->get('request')->server['HTTPS'] == 'on') || ($this->registry->get('request')->server['HTTPS'] == '1'))) {
         $server = HTTPS_SERVER;
      } else {
         //to prevent garbage session need to check constant HTTP_SERVER
         $server = defined('HTTP_SERVER') ? HTTP_SERVER : 'http://' . REAL_HOST . get_url_path($_SERVER['PHP_SELF']);
      }

Title: Re: Admin timeout login URL HTTPS_SERVER
Post by: gswan on November 09, 2017, 06:47:09 PM
Once the "SEO URL's" setting was enabled (and .htaccess included) the problem is no longer present.

Title: Re: Admin timeout login URL HTTPS_SERVER
Post by: Basara on November 10, 2017, 12:43:00 AM
Thank you, gswan