= Secure connection is failed =
If the following warning is displayed when enabling secure connection on the '''General''' page in the administrator panel:
<blockquote>'''Warning''': The secure connection check has failed. Check HTTPS settings in '''config.php''' file and make sure that SSL certificate is installed on your server.
</blockquote>
# Check whether SSL certificate is installed on the server. I.e. check whether the following HTML page is accessible through HTTPS as well as it is through HTTP:
::* [http://your_store.com/directory/store_closed.html http://your_store.com/directory/store_closed.html]
::* [https://your_store.com/directory/store_closed.html https://your_store.com/directory/store_closed.html]
::* If when using the URLs mentioned above the opened pages have the same content it means that SSL certificate is installed on the server.
# Check whether the host and directory where cs-cart is installed on the secure server are set up in the '''config.php''' file located in the root CS-Cart directory. To check it refer to [http://kb.cs-cart.com/ssl-installation here].
# Check if there is proxy on your server. If it is, please follow the instructions in item #2 in [http://kb.cs-cart.com/curl-problem this article].
# If everything is set up properly but the warning is displayed, most probably the problem is caused by specific way of determining secure connection on your server.
## Compare PHP configuration of your store and its copy in the secure directory:
### Log in your administrator panel and click on the '''PHP information''' link at the bottom. The following page will be open: [http://www.your_domain.com/admin.php?target=tools&mode=phpinfo http://www.your_domain.com/admin.php?target=tools&mode=phpinfo], where your_domain.com is the address of your store.
### Open the [https://www.your_domain.com/admin.php?target=tools&mode=phpinfo https://www.your_domain.com/admin.php?target=tools&mode=phpinfo] (note https instead of http is used in this link).
### Compare the opened pages.
:: '''For example''': The store has the '''_SERVER["SERVER_PORT"]''' setting with the '''80''' value and its copy in the secure directory has the same setting with the '''443''' value.
### Add one more condition to the '''https_detect.php''' file located in the '''core''' directory.
:: '''For example''':
#### Add the following part of code to the file:
<pre><source lang="php">} elseif ($_SERVER['SERVER_PORT']=='443') {
define('HTTPS', true);</source></pre>
below this one:
<pre><source lang="php">} elseif (isset($_SERVER['HTTP_X_FORWARDED_SERVER']) && ($_SERVER['HTTP_X_FORWARDED_SERVER']=='secure')) {
define('HTTPS', true);</source></pre>
#### Save the file.
#### Try to enable the secure connection options.</div></div>