title: How to fix: Unable to connect to www.google.com:443 . Error #0: stream_socket_client(): unable to connect to www.google.com:443 (No route to host)
body: <p>I'm trying to use recaptcha in Zend Framework 3. When I submit the form, I get the error:</p>
  
  <blockquote>
    <p>Unable to connect to www.google.com:443 . Error #0: stream_socket_client(): unable to connect to www.google.com:443 (No route to host)</p>
  </blockquote>
  
  <p>My code works with test keys on lockalhost under Windows. But don't work on my linux hosting.</p>
  
  <h2>MyForm.php</h2>
  
  <pre><code>&lt;?php
  use Zend\Captcha\ReCaptcha;
  use Zend\Form\Element;
  
  class MyForm extends Form {
    private const SITE_KEY = '';
    private const SECRET_KEY = '';
    public function __construct($name = null) {
      // Add some elements
      parent::__construct('new_password');
      $captcha = new Element\Captcha('captcha');
      $recaptcha = new ReCaptcha();
      $recaptcha-&gt;setSiteKey(self::SITE_KEY);
      $recaptcha-&gt;setSecretKey(self::SECRET_KEY);
      $captcha-&gt;setCaptcha($recaptcha);
      $captcha-&gt;setLabel('Please verify you are human');
      $this-&gt;add($captcha);
      // Add submit
    }
  }
  ?&gt;
  </code></pre>
  
  <h2>my_template.phtml</h2>
  
  <pre><code>&lt;?php 
    $captcha = $form-&gt;get('captcha'); ?&gt;
    &lt;?php echo $this-&gt;form()-&gt;openTag($form); ?&gt;
    &lt;div&gt;
      &lt;?= $this-&gt;formLabel($captcha) ?&gt;
      &lt;?= $this-&gt;formElement($captcha) ?&gt;
      &lt;?= $this-&gt;formElementErrors()-&gt;render($captcha) ?&gt;
    &lt;/div&gt;
    &lt;?php
      echo $this-&gt;formSubmit($submit);
      echo $this-&gt;form()-&gt;closeTag();
     ?&gt;
  </code></pre>
  
  <p>Please tell me how to solve this problem.</p>