robertbell Posted November 8, 2018 Share Posted November 8, 2018 Running version 6.2.2 without issue since August, and was able to log on last week. Today when I attempt to log on, after entering my user name and password at https://www.sojourner.biz/admin_XXXXXX.php the browser attempts to load https://www.sojourner.bizhttps/www.sojourner.bizhttps://www.sojourner.biz/admin_XXXXXX.php, , which does not resolve. Presumably, something changed. Any suggestions as to where I should look? Thanks. Link to comment Share on other sites More sharing options...
robertbell Posted November 8, 2018 Author Share Posted November 8, 2018 And not logged in, I can add items to the basket, but when I click on view basket, it redirects to https://www.sojourner.bizhttps/www.sojourner.bizhttps://www.sojourner.biz/index.php?_a=basket. Not good. And clicking on checkout brings me to: Link to comment Share on other sites More sharing options...
bsmither Posted November 8, 2018 Share Posted November 8, 2018 Please check for any hosting account control panel settings that may affect URL rewriting to enforce https. Link to comment Share on other sites More sharing options...
robertbell Posted November 8, 2018 Author Share Posted November 8, 2018 There's a functioning wild-card redirect to https. From the .htaccess in the document root: RewriteRule ^(.*)$ "https\:\/\/www\.sojourner\.biz\/$1" [R=301,L] Link to comment Share on other sites More sharing options...
bsmither Posted November 8, 2018 Share Posted November 8, 2018 I started with the https URL and everything seems to be fine for me. You may want to check in admin, Store Settings, SSL tab that your cookie domain is .sojourner.biz. The cookie I got says it is .www.sojourner.biz (which is not accurate). Check the global.inc.php file for any hard-coded variable related to SSL. Link to comment Share on other sites More sharing options...
robertbell Posted November 8, 2018 Author Share Posted November 8, 2018 Hmm. Well, I can't get to admin, store settings, since it won't let me log in. ini.inc.php includes the lines: Quote } else { ## Detect if SSL is enabled if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS'])!== 'off' && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == true) || $_SERVER['SERVER_PORT'] == 443) { define('CC_SSL', true); } else { define('CC_SSL', false); } } Quote $url = (CC_SSL ? 'https://' : 'http://') . $server_name . $script_path; You say everything seems fine for you (it obviously doesn't like me anymore). If you add something to the basket and then view basket, do you actually see the basket or https://www.sojourner.bizhttps/www.sojourner.bizhttps://www.sojourner.biz/index.php?_a=basket Link to comment Share on other sites More sharing options...
bsmither Posted November 8, 2018 Share Posted November 8, 2018 The "canonical" and "hreflang" links in the <head> section is messed up. The css and javascript src links are missing :/ from the URL protocol. The file I mentioned to check is /includes/global.inc.php (not ini.inc.php). Link to comment Share on other sites More sharing options...
robertbell Posted November 8, 2018 Author Share Posted November 8, 2018 No reference to SSL in includes/global.inc.php. Where are the css and javascript src links defined? Link to comment Share on other sites More sharing options...
bsmither Posted November 8, 2018 Share Posted November 8, 2018 There is a new file for CC620, /includes/lib/smarty/plugins/function.combine.php. It wants to use the constant CC_ROOT_REL. That constant is developed in ini.inc.php which either takes the rootRel variable in global.inc.php (if present) or uses what the web server gives to PHP. To determine what the web server gives to PHP, do this: Create a new file called: phpinfo.php It's contents are: <?php phpinfo(); ?> Place this file in CubeCart's main folder. Then ask for it in your browser. (www.sojourner.biz/phpinfo.php) You will get a series of tables. Scroll to the bottom and find PHP Variables. Then find the HTTP_HOST, SERVER_NAME, SERVER_PORT, HTTPS, and SERVER_PROTOCOL. Link to comment Share on other sites More sharing options...
robertbell Posted November 8, 2018 Author Share Posted November 8, 2018 _SERVER["HTTP_HOST"] www.sojourner.biz _SERVER["SERVER_NAME"] www.sojourner.biz _SERVER["SERVER_PORT"] 443 _SERVER["HTTPS"] on _SERVER["SERVER_PROTOCOL"] HTTP/1.1 Link to comment Share on other sites More sharing options...
robertbell Posted November 8, 2018 Author Share Posted November 8, 2018 But _SERVER["SCRIPT_URI"] https://www.sojourner.bizhttps://www.sojourner.biz/phpinfo.php Where is this set? Link to comment Share on other sites More sharing options...
bsmither Posted November 8, 2018 Share Posted November 8, 2018 SCRIPT_URI? Is there also a REQUEST_URI? These keys to the _SERVER[ ] array come from the web server. Link to comment Share on other sites More sharing options...
robertbell Posted November 8, 2018 Author Share Posted November 8, 2018 _SERVER["REQUEST_URI"] /phpinfo.php _SERVER["SCRIPT_URI"] https://www.sojourner.bizhttps://www.sojourner.biz/phpinfo.php _SERVER["SCRIPT_URL"] https://www.sojourner.biz/phpinfo.php _SERVER["SCRIPT_NAME"] https://www.sojourner.biz/phpinfo.php Link to comment Share on other sites More sharing options...
robertbell Posted November 8, 2018 Author Share Posted November 8, 2018 I restored a backup of the store root .htaccess file, and it's working now. I like backups. Thanks for your help. Link to comment Share on other sites More sharing options...
bsmither Posted November 8, 2018 Share Posted November 8, 2018 An Internet Search suggests that SCRIPT_URI is what the web server uses to hold the original script path - the part after the domain name - before the rewriting changes it. If there is no rewriting, there is no (usually) SCRIPT_URI. What were the differences in the two .htaccess files? Link to comment Share on other sites More sharing options...
robertbell Posted November 9, 2018 Author Share Posted November 9, 2018 There were a bunch but none that looked evil. I'm more concerned about why there were any. Off to bug the hosting provider... Link to comment Share on other sites More sharing options...
robertbell Posted November 9, 2018 Author Share Posted November 9, 2018 Looks like the host was being helpful. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.