Enable secure connection

I am having a problem that does not seem to be answered for my situation. First the problem. When I enable secure connection, I get the following error (the same as discussed in other topics)



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.



Background: for better or worse my ssl is for domain.com. I may need to change this but I still think I should be able to get this to work. I have confirmed the cert is working correctly per the knowledge base. CS Cart is installed in domain.com/develop so my config.local.php looks like this:



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

$config[‘http_host’] = ‘www.domain.com’;

$config[‘http_path’]= ‘/develop’;



// Host and directory where cs-cart is installed on secure server

$config[‘https_host’] = ‘domain.com’;

$config[‘https_path’] = ‘/develop’;



I tried the no-secure as both www.domain.com and just domain.com and the ssl cert is installed in the root.



Per the knowledge base, it appears I may need to modify the prepare.php but this is where I get confused. If I post the php variables for both the http and https and the prepare.php can someone direct me on how to make the appropriate changes.

If you are sure your SSL cert is working and the https_host is set correctly in config.local.php you can try this



Open

schemas/settings/actions.php



change

```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’));

} ```to this

```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’));

}
/ ```

Did I read that correctly to just add /* , and /* surrounding the code. When I do that I get a syntax error unexpected $end.

This is what the actions.php looks like now that I have changed it.



if ( !defined(‘AREA’) ) { die(‘Access denied’); }



/**

  • Check if secure connection is available

    */

    function fn_settings_actions_general_secure_auth(&$new_value, $old_value)

    {

    if ($new_value == ‘Y’) {

    $content = fn_https_request(‘GET’, Registry::get(‘config.https_location’) . ‘/’ . INDEX_SCRIPT . ‘?check_https=Y’);

    /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’));

    }/


    }

    }



    /**
  • Check if secure connection is available

    */

    function fn_settings_actions_general_secure_checkout(&$new_value, $old_value)

    {

    return fn_settings_actions_general_secure_auth($new_value, $old_value);

    }

Your closing tag is incorrect

It should be */

That worked. This forum is invaluable for us newbs. Thank you for your help.

Thanks lot S-Combs…I was having exactly the same problem after renewing my SSL. The renewed SSL was installed correctly as per my host server tech people. So I have tried your solution. Frankly, I dont know what the simple */ tag did…but it worked!!! :-)