CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Cannot enable SSL
Pages: [1]

Author Topic: Cannot enable SSL  (Read 1699 times)

thalemn

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.5.30-log
  • PHP version: 5.2.17
Cannot enable SSL
March 25, 2014, 02:31:16 pm
I have a Drupal 7 Install that has a SSL that works as expected. 
I also have a CiviCRM Install that SHOULD use the same SSL because CiviCRM is installed in a subdirectory of the Drupal 7 install.

But I cannot enable SSL in CiviCRM.  I have contacted the hosting company (CiviHosting) and they cannot figure out what is preventing enabling SSL in CiviCRM.  They suggested I post my problem here.

Any suggestions?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cannot enable SSL
March 26, 2014, 07:07:42 am
To clarify, this is a Drupal 7.26 site with CiviCRM 4.4.4. Visiting the site via https works fine in Firefox, no warnings. It's 128 bit, but that should be fine.

When I visit civicrm/admin/setting/url and set " Force Secure URLs (SSL) " to Yes it comes back and says:

>    You need to set up a secure server before you can use the Force Secure URLs option

and I don't know why. :(

All this is with with the leading "www" in the domain name.

EDIT: To clarify, SSLs work fine with CiviCRM on CiviHosting and we have many clients using them with no problems whatsoever. The issue in this case is something specific to this site.
« Last Edit: April 11, 2014, 03:20:29 am by Hershel »
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

thalemn

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.5.30-log
  • PHP version: 5.2.17
Re: Cannot enable SSL
April 29, 2014, 11:45:47 am
Hershel,

No one has stepped up yet...any other thoughts?

Anyone have any ideas?  We need this to work, please.

Thank you.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cannot enable SSL
April 30, 2014, 08:06:47 am
I looked into the code and found that function checkURL was returning false. It is our analysis that this is due to the fact that authentication is enabled at the URL https://www.SITE.com/civicrm/dashboard?reset=1. As a result, the URL returns the header "Content-Length: 0":

Code: [Select]
HTTP/1.1 302 Moved Temporarily Date: Wed, 30 Apr 2014 14:38:04 GMT Server: Apache Expires: Sun, 19 Nov 1978 05:00:00 GMT Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0 Last-Modified: Wed, 30 Apr 2014 14:38:04 GMT ETag: "1398868684" Location: http://www.SITE.com/civicrm/dashboard?reset=1 Content-Length: 0 Content-Type: text/html
The output of this is indeed 1:

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );

However, the call to curl_exec() at the end of the function returns false, because of this authentication issue. This issue is mentioned here:

http://forums.devshed.com/php-development-5/curl-curlopt_returntransfer-300420.html

Why this happens only on this site I do not know.

I chose to simply hack the file CRM/Utils/System.php to get this site to work as expected.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: Cannot enable SSL
May 19, 2014, 12:42:36 pm
I have the same problem!  I have just obtained an SSL certificate and my site is now running OK using https but I can't enable 'Force Secure URLs (SSL) ' as I get the error message 'You need to set up a secure server before you can use the Force Secure URLs option'.  I'm using Drupal and 4.4.5.  As others seem to be affected, should I report this as a bug?
Andy Clark

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cannot enable SSL
May 20, 2014, 05:05:53 am
Quote from: clarkac on May 19, 2014, 12:42:36 pm
As others seem to be affected, should I report this as a bug?

I think so. Turns out that the site I am working with, whereas now the Ubercart SSL module works fine and https://www.site.com/cart/checkout is secure and works, CiviCRM redirects https to http, including paid event pages. This is even though  Force Secure URLs (SSL) is set to Yes.

So my hack may not have solved the problem fully. :(
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Dave Doligalski

  • I’m new here
  • *
  • Posts: 4
  • Karma: 1
    • BackOffice Thinking
  • CiviCRM version: A whole barrel of versions
  • CMS version: Drupal, Joomla, WordPress, oh my!
  • MySQL version: a bunch of them
  • PHP version: same as mysql versions
Re: Cannot enable SSL
May 20, 2014, 02:50:03 pm

I have at least one civi site at civihosting with the same issue. This is with civi 4.3.7 (running Drupal 7.22).  -Dave

Dave Doligalski

  • I’m new here
  • *
  • Posts: 4
  • Karma: 1
    • BackOffice Thinking
  • CiviCRM version: A whole barrel of versions
  • CMS version: Drupal, Joomla, WordPress, oh my!
  • MySQL version: a bunch of them
  • PHP version: same as mysql versions
Re: Cannot enable SSL
May 20, 2014, 03:04:20 pm
Just after posting that I had the problem, I found that the CIVICRM_UF_BASEURL setting in civicrm.settings.php was not the same as the cert's URL.  After adjusting that I was able to turn on SSL in civi. -Dave

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: Cannot enable SSL
May 21, 2014, 12:50:27 am
I checked my civicrm settings file full of hope, but the CIVICRM_UF_BASEURL was the same as my SSL cert  :-\
Andy Clark

thalemn

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.5.30-log
  • PHP version: 5.2.17
Re: Cannot enable SSL
May 21, 2014, 09:05:39 am
After further investigation, I discovered that using Ubercart SSL (Drupal module) was overriding the CiviCRM SSL configuration to automatically apply SSL to specific pages.  So I replaced Ubercart SSL with Secure Pages module, and configured it to use SSL on all CiviCRM content (civicrm/*).  Works as expected now.

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: Cannot enable SSL
May 25, 2014, 03:26:38 am
I installed 'Secure Login' module and it now doesn't seem possible to access the system except via https, but still the 'Force Secure URLs (SSL)' option doesn't work.  I have raised a bug report https://issues.civicrm.org/jira/browse/CRM-14744
Andy Clark

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cannot enable SSL
May 25, 2014, 03:27:38 am
I have had success in the past with the "Secure Pages" module. Can you try that?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: Cannot enable SSL
May 25, 2014, 04:07:44 am
I just tried this module https://drupal.org/project/securepages.  Made no difference.
Andy Clark

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Cannot enable SSL

This forum was archived on 2017-11-26.