2017-04-13 86 views
0

啓用ssl_module當我啓用ssl_module,阿帕奇永遠不工作 如果我禁用ssl_module在wampserver

#LoadModule ssl_module modules/mod_ssl.so 

我wampserver將再次合作。

我試圖通過本地主機&笨發送使用gmail郵箱,我得到這個錯誤:

A PHP Error was encountered

Severity: Warning

Message: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Filename: libraries/Email.php

Line Number: 2063

Backtrace:

File: D:\wamp64\www\TracerStudy\application\controllers\regis.php Line: 128 Function: send

File: D:\wamp64\www\TracerStudy\index.php Line: 315 Function: require_once

- 更新 - 我得到這個錯誤:

Severity: Warning

Message: fsockopen(): php_network_getaddresses: getaddrinfo failed: No such host is known.

我的代碼:

$config = Array(
      'protocol' => 'smtp', 
      'smtp_host' => 'ssl://smtp.googlemail.com', 
      'smtp_port' => 465, 
      'smtp_user' => 'mymail', 
      'smtp_pass' => 'mypassword', 
      'mailtype' => 'html', 
      'charset' => 'iso-8859-1', 
      'smtp_crypto' => 'ssl', 
      'wordwrap' => TRUE 
     ); 

     $this->load->library('email', $config); 
     $this->email->set_newline("\r\n"); 
     $this->email->from('myemail'); 
     $this->email->to('sendemail'); 
     $this->email->subject('subject'); 
     $this->email->message('message'); 
     if($this->email->send()) 
     { 
      echo 'Email sent.'; 
     } 
     else 
     { 
      show_error($this->email->print_debugger()); 
     } 

回答

0

禁用您的防病毒...它解決了我的問題