2

I recently introduced SSL across my entire Drupal-Civicrm site. Now when I visit the contact summary page, I'm confronted with warning errors (below) that are clearly related to SSL interfering with accessing the contact's image dimensions.

Note that the image is visible in the summary page but its aspect ratio is wrong (the image is squeezed), confirming that getting the image's dimensions failed (without SSL, the image aspect was correct).

I am using a self-signed certificate as I'm still in the development stage. I tried to disable certificate verification in php.ini (setting the parameters verify_peer=false, allow_self_signed=true, verify_peer_name=false) but it did not solve the issue.

Warning: getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in CRM_Contact_Page_View->preProcess() (line 164 of /var/www/prod/sites/all/modules/civicrm/CRM/Contact/Page/View.php).

Warning: getimagesize(): Failed to enable crypto in CRM_Contact_Page_View->preProcess() (line 164 of /var/www/prod/sites/all/modules/civicrm/CRM/Contact/Page/View.php).

Warning: getimagesize(http://abdong.duckdns.org/index.php?q=civicrm/contact/imagefile&photo=500x500bb_3_a5ece8ea35cdb1947316bd7c98d5daf9.jpg): failed to open stream: operation failed in CRM_Contact_Page_View->preProcess() (line 164 of /var/www/prod/sites/all/modules/civicrm/CRM/Contact/Page/View.php).

3
  • Check that you have set "Verify SSL" to "No" at civicrm/admin/setting/url
  • Note that CiviCRM is storing absolute URLs in DB civicrm_contact.image_URL - even once your SSL config is fine, you may see images not appear on SSL due to CRM-14207: Contact's image URL is full & absolute path
  • Chris, thanks for the advice. I forgot to mention that I already tried setting Verify SSL to No, but it did not solve the problem. I just checked out CRM-14207, you referenced above, and it seems like others are having very similar issues. That is a good lead for me. I'll report back once i find a solution. tnx. – alonjr Oct 16 '15 at 19:47
  • 2
    What you're seeing is coming from this block in CRM_Contact_Page_View::preprocess(). The mentioned image URL is not an image, so you may need to solve that to stop triggering this bug ... But the getimagesize() call in that code really should better handle this case by checking the returned result before setting values from it, there's no sense in setting image width and height to zero. – Chris Burgess Oct 16 '15 at 20:34
  • 1
    Those three warnings in your question seem like CiviCRM is trying to access an HTTP URL and verify the returned certificate from the same URL (which has no cert because it's not SSL). I don't see what configuration triggers this, but I'm pretty sure that's not going to work out :D – Chris Burgess Oct 16 '15 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.