Body: <p>I have installed <a href="https://www.drupal.org/" rel="nofollow noreferrer" title="Drupal">Drupal</a> and then installed <a href="https://civicrm.org/" rel="nofollow noreferrer">Civicrm</a> 4.7.19 with the demo data and I have enabled google maps to geo code contacts address.</p>
  
  <p>The problem now when I search using 'address fields' in 'advanced search'</p>
  
  <p>I have added a Postal code and 'Find contacts within'</p>
  
  <p>I always got this message </p>
  
  <blockquote>
    <p>Sorry but we are not able to provide this at the moment.</p>
  </blockquote>
  
  <p>and here is the error details</p>
  
  <pre><code>Additional Details:
  
  Array
  (
      [callback] =&gt; Array
          (
              [0] =&gt; CRM_Core_Error
              [1] =&gt; handle
          )
  
      [code] =&gt; 0
      [message] =&gt; 
      [mode] =&gt; 16
      [debug_info] =&gt; 
      [type] =&gt; PEAR_Error
      [user_info] =&gt; 
      [to_string] =&gt; [pear_error: message="" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
  )
  
  
  backTrace
  
  #0 /var/sites/all/modules/civicrm/CRM/Core/Error.php(187): CRM_Core_Error::backtrace()
  #1 [internal function](): CRM_Core_Error::handle(Object(PEAR_Error))
  #2 /var/sites/all/modules/civicrm/packages/PEAR.php(921): call_user_func((Array:2), Object(PEAR_Error))
  #3 /var/sites/all/modules/civicrm/packages/PEAR.php(577): PEAR_Error-&gt;__construct("", 0, 16, (Array:2), NULL)
  #4 [internal function](): PEAR-&gt;_raiseError(Object(Net_Socket), "", 0)
  #5 /var/sites/all/modules/civicrm/packages/PEAR.php(224): call_user_func_array((Array:2), (Array:3))
  #6 /var/sites/all/modules/civicrm/packages/Net/Socket.php(156): PEAR-&gt;__call("raiseError", (Array:2))
  #7 /var/sites/all/modules/civicrm/packages/Net/Socket.php(156): Net_Socket-&gt;raiseError("", 0)
  #8 /var/sites/all/modules/civicrm/packages/HTTP/Request.php(737): Net_Socket-&gt;connect("ssl://maps.googleapis.com", 443, NULL, NULL, NULL)
  #9 /var/sites/all/modules/civicrm/CRM/Utils/Geocode/Google.php(126): HTTP_Request-&gt;sendRequest()
  #10 /var/sites/all/modules/civicrm/CRM/Contact/BAO/ProximityQuery.php(344): CRM_Utils_Geocode_Google::format((Array:4))
  #11 /var/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(1992): CRM_Contact_BAO_ProximityQuery::process(Object(CRM_Contact_BAO_Query), (Array:5))
  #12 /var/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(2031): CRM_Contact_BAO_Query-&gt;whereClauseSingle((Array:5), NULL)
  #13 /var/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(519): CRM_Contact_BAO_Query-&gt;whereClause(NULL)
  #14 /var/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(479): CRM_Contact_BAO_Query-&gt;initialize(NULL)
  #15 /var/sites/all/modules/civicrm/CRM/Contact/Selector.php(237): CRM_Contact_BAO_Query-&gt;__construct((Array:7), NULL, NULL, FALSE, FALSE, 1, FALSE, TRUE, FALSE, "", "AND")
  #16 /var/sites/all/modules/civicrm/CRM/Contact/Form/Search.php(692): CRM_Contact_Selector-&gt;__construct(NULL, (Array:46), (Array:7), NULL, 512, FALSE, TRUE, "advanced", (Array:11))
  #17 /var/sites/all/modules/civicrm/CRM/Contact/Form/Search/Advanced.php(45): CRM_Contact_Form_Search-&gt;preProcess()
  #18 /var/sites/all/modules/civicrm/CRM/Core/Form.php(543): CRM_Contact_Form_Search_Advanced-&gt;preProcess()
  #19 /var/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Refresh.php(62): CRM_Core_Form-&gt;buildForm()
  #20 /var/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Refresh-&gt;perform(Object(CRM_Contact_Form_Search_Advanced), "refresh")
  #21 /var/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller-&gt;handle(Object(CRM_Contact_Form_Search_Advanced), "refresh")
  #22 /var/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page-&gt;handle("refresh")
  #23 /var/sites/all/modules/civicrm/CRM/Core/Invoke.php(310): CRM_Core_Controller-&gt;run((Array:4), (Array:0))
  #24 /var/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
  #25 /var/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
  #26 /var/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:4))
  #27 [internal function](): civicrm_invoke("contact", "search", "advanced")
  #28 /var/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
  #29 /var/index.php(26): menu_execute_active_handler()
  #30 {main}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-30T13:01:58.570Z
Comments.Text: It looks like the error is related to Google's geocoding service.  Have you tried turning geocoding off to see if you still get an error?
Comments.UserDisplayName: William Mortada
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-03T13:46:41.810Z
Comments.Text: I have disabled it and not I can see the range to search with but I want to fix the problem to google geocoding service because my task is related to this part
Comments.UserDisplayName: Karim Samir
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-03T15:03:44.287Z
Comments.Text: If I understand you correctly there isn't an error if you disable geocoding.  So it sounds like this is an issue with the connection to Google's geocoding service.
Comments.UserDisplayName: William Mortada
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-05T11:28:44.173Z
Comments.Text: Do you know how to solve it ? because I can't find the real cause of the error.
Comments.UserDisplayName: Karim Samir
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-05T15:18:19.473Z
Comments.Text: Sorry, it's not an area I have experience with.  I'm hoping someone else can make a suggestion here.
Comments.UserDisplayName: William Mortada
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-06T15:40:11.497Z
Comments.Text: I know how to solve it but I don't know the exact error, or where I can find it
Comments.UserDisplayName: Karim Samir
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-30T12:58:57.393Z
Comments.Text: Welcome to StackExchange! I've amended the title and improved the formatting to try to make the question a bit clearer.
Comments.UserDisplayName: William Mortada
Tags: <drupal><search><geocoding>
Title: Advanced search with geocoding generates error
ThreadText: # Advanced search with geocoding generates error
  
  (Asked by: username_0 on 2017-06-30)
  
  I have installed Drupal and then installed Civicrm 4.7.19 with the demo data and I have enabled google maps to geo code contacts address.
  The problem now when I search using 'address fields' in 'advanced search'
  I have added a Postal code and 'Find contacts within'
  I always got this message 
  
  Sorry but we are not able to provide this at the moment.
  
  and here is the error details
  Additional Details:
  
  Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => handle
          )
  
      [code] => 0
      [message] => 
      [mode] => 16
      [debug_info] => 
      [type] => PEAR_Error
      [user_info] => 
      [to_string] => [pear_error: message="" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
  )
  
  
  backTrace
  
  #0 /var/sites/all/modules/civicrm/CRM/Core/Error.php(187): CRM_Core_Error::backtrace()
  #1 [internal function](): CRM_Core_Error::handle(Object(PEAR_Error))
  #2 /var/sites/all/modules/civicrm/packages/PEAR.php(921): call_user_func((Array:2), Object(PEAR_Error))
  #3 /var/sites/all/modules/civicrm/packages/PEAR.php(577): PEAR_Error->__construct("", 0, 16, (Array:2), NULL)
  #4 [internal function](): PEAR->_raiseError(Object(Net_Socket), "", 0)
  #5 /var/sites/all/modules/civicrm/packages/PEAR.php(224): call_user_func_array((Array:2), (Array:3))
  #6 /var/sites/all/modules/civicrm/packages/Net/Socket.php(156): PEAR->__call("raiseError", (Array:2))
  #7 /var/sites/all/modules/civicrm/packages/Net/Socket.php(156): Net_Socket->raiseError("", 0)
  #8 /var/sites/all/modules/civicrm/packages/HTTP/Request.php(737): Net_Socket->connect("ssl://maps.googleapis.com", 443, NULL, NULL, NULL)
  #9 /var/sites/all/modules/civicrm/CRM/Utils/Geocode/Google.php(126): HTTP_Request->sendRequest()
  #10 /var/sites/all/modules/civicrm/CRM/Contact/BAO/ProximityQuery.php(344): CRM_Utils_Geocode_Google::format((Array:4))
  #11 /var/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(1992): CRM_Contact_BAO_ProximityQuery::process(Object(CRM_Contact_BAO_Query), (Array:5))
  #12 /var/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(2031): CRM_Contact_BAO_Query->whereClauseSingle((Array:5), NULL)
  #13 /var/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(519): CRM_Contact_BAO_Query->whereClause(NULL)
  #14 /var/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(479): CRM_Contact_BAO_Query->initialize(NULL)
  #15 /var/sites/all/modules/civicrm/CRM/Contact/Selector.php(237): CRM_Contact_BAO_Query->__construct((Array:7), NULL, NULL, FALSE, FALSE, 1, FALSE, TRUE, FALSE, "", "AND")
  #16 /var/sites/all/modules/civicrm/CRM/Contact/Form/Search.php(692): CRM_Contact_Selector->__construct(NULL, (Array:46), (Array:7), NULL, 512, FALSE, TRUE, "advanced", (Array:11))
  #17 /var/sites/all/modules/civicrm/CRM/Contact/Form/Search/Advanced.php(45): CRM_Contact_Form_Search->preProcess()
  #18 /var/sites/all/modules/civicrm/CRM/Core/Form.php(543): CRM_Contact_Form_Search_Advanced->preProcess()
  #19 /var/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Refresh.php(62): CRM_Core_Form->buildForm()
  #20 /var/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Refresh->perform(Object(CRM_Contact_Form_Search_Advanced), "refresh")
  #21 /var/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Search_Advanced), "refresh")
  #22 /var/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("refresh")
  #23 /var/sites/all/modules/civicrm/CRM/Core/Invoke.php(310): CRM_Core_Controller->run((Array:4), (Array:0))
  #24 /var/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
  #25 /var/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
  #26 /var/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:4))
  #27 [internal function](): civicrm_invoke("contact", "search", "advanced")
  #28 /var/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
  #29 /var/index.php(26): menu_execute_active_handler()
  #30 {main}
  
  **Tags:** drupal, search, geocoding
  
  > **Comments:**
  > **username_1**: Welcome to StackExchange! I've amended the title and improved the formatting to try to make the question a bit clearer.  
  > **username_1**: It looks like the error is related to Google's geocoding service.  Have you tried turning geocoding off to see if you still get an error?  
  > **username_0**: I have disabled it and not I can see the range to search with but I want to fix the problem to google geocoding service because my task is related to this part  
  > **username_1**: If I understand you correctly there isn't an error if you disable geocoding.  So it sounds like this is an issue with the connection to Google's geocoding service.  
  > **username_0**: Do you know how to solve it ? because I can't find the real cause of the error.  
  > **username_1**: Sorry, it's not an area I have experience with.  I'm hoping someone else can make a suggestion here.  
  > **username_0**: I know how to solve it but I don't know the exact error, or where I can find it  
  
  ---
  
  ## 0 answers
  
  