In admin, I am trying to enable a secure connection at checkout, but every time I check the box and save the settings, I get the following error message:
The secure connection check has failed. Please check HTTPS settings in the “config.php” file and make sure that SSL certificate is installed on your server.
Just like you use Network Solutions hosting and Secure Certificate. Tried to enable a secure connection at checkout, but Got the same error message as you.
As I researched for detect SSL connection in prepare.php script, It checks these server vars:
_SERVER[‘HTTPS’] , _SERVER[‘HTTP_X_FORWARDED_SERVER’], _SERVER[‘SCRIPT_URI’], _SERVER[‘HTTP_HOST’], and _SERVER[“SERVER_PORT”]
I run my _SERVER[‘SCRIPT_URI’] under https conection, but all these variable checks failed. What other methods can I detect the page is runing under https conection?
Any one have better suggetions? Any helps will be appreciated!
Finally, I found the problem is caused by PHP CGI/FastCGI module. Some web hosts implement php as a CGI/FastCGI in such a way that they can turn it on or off for each virtual domain. Several or all $_SERVER and $_ENV variable values may be the same in http and https mode. That is why I checked PHP Variables inside phpinfo() are the same in http and https mode, except remote port!
In this case, $_SERVER or $_ENV can’t work well to detect if https is on or not!!!
Right now, I can only direct point to the checkout and login page with full https link.
I think Cs-cart need to come out some manual https connection mode settings for this case…