Ssl - Can't Enable Secure Connection.. Tried Many Solutions?

I’m just finishing a new store - I have an SSL cert installed and I can see it’s working as I’m able to visit:

http://www.mystore.co.uk/store_closed.html and

https://www.mystore.co.uk/store_closed.html



…however other pages (like https://www.mystore.co.uk) just automatically revert back to the standard http address…



I’ve tried ‘Enable secure connection at checkout’, ‘Enable secure connection in the administration panel’ etc but I always get the error message:

‘Warning 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.’



I checked in the config.php but wasn’t sure exactly what I was checking for…



I then checked the config.local.php (CS-Cart Documentation — CS-Cart 4.15.x documentation) and it seems ok to me…

The store is in the root directory so I have:

// Host and directory where software is installed on no-secure server

$config[‘http_host’] = ‘www.mystore.co.uk’;

$config[‘http_path’] = ‘’;



// Host and directory where software is installed on secure server

$config[‘https_host’] = ‘www.mystore.co.uk’;

$config[‘https_path’] = ‘’;





I tried adding the code:

} elseif ($_SERVER[‘SERVER_PORT’]==‘443’) {

define(‘HTTPS’, true);

to the prepare.php file (again as per knowledgebase)



and have checked that Curl is installed and running…





None of the solutions I’ve found so far in the forums have helped…



any suggestions gratefully recieved

:rolleyes: :rolleyes: :rolleyes: :( :rolleyes:

I found a forum reply which seems to work (http://forum.cs-cart…__1#entry108602)



Commenting out this code from schemas/settings/actions.php:



/* if (empty($content[1]) || $content[1] != 'OK') {

// Disable https

db_query(“UPDATE ?:settings SET value = 'N' WHERE section_id = 'General' AND option_name LIKE 'secure_%'”);

$new_value = 'N';

fn_set_notification('W', fn_get_lang_var('warning'), fn_get_lang_var('warning_https_disabled'));

} */



I can now activate the Secure Connection…



Can anyone confirm that this is OK to do - or is it likely to throw up other problems?



thanks

I am having the same problem. i have forced cs-cart to use ssl on all pages, but this is not a permanent solution. Also, i have seen that this does cause ajax errors when an unsecure connection is being used while forcing ssl. I'm guessing that the problem is caused by an environment variable is not being set because ssl is not “turned on” in the admin section. Assuming that my ssl is set up correctly (it works when i force it to), why am i not able to change the settings in the admin section?



any help would be greatly appreciated.