升级到php 7后出现fsockopen错误

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了升级到php 7后出现fsockopen错误脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我在数字海洋NginxPHP 7上运行codeignITer3.03.当我尝试发送邮件时,我收到此错误

码:

我的电子邮件设置是

$config['useragent'] = 'CodeIgniter';
$config['PRotocol'] = 'smtp';
//$config['mailpath'] = '/usr/sbin/sendmail';
$config['smtp_host'] = 'ssl://smtp.GOOGLEmail.COM';
$config['smtp_user'] = 'xxxxxx@gmail.com';
$config['smtp_pass'] = 'xxxxxxxxxxxx';
$config['smtp_port'] = 465; 
$config['smtp_timeout'] = 5;
$config['wordwrap'] = TRUE;
$config['wrapchars'] = 76;
$config['mailtyPE'] = 'htML';
$config['charset'] = 'utf-8';
$config['validate'] = FALSE;
$config['priority'] = 3;
$config['crlf'] = "\r\n";
$config['newline'] = "\r\n";
$config['bcc_batch_mode'] = FALSE;
$config['bcc_batch_size'] = 200;

这个版本在PHP 5.x下的相同配置中运行完美.

PHP.ini我有

extension=PHP_openssl.dll

启用.

我无法得到任何暗示,为什么这不应该PHP7中工作.任何人都可以给我一个提示要检查的内容或这个错误原因是什么.

你有没有试过smtp.googlemail.com?

另请注意另一个答案,一个工作示例(例如在超时定义中似乎有所不同):

> phpmailer send gmail smtp timeout

另一种方案

> Having trouble with PHPMailer

脚本宝典总结

以上是脚本宝典为你收集整理的升级到php 7后出现fsockopen错误全部内容,希望文章能够帮你解决升级到php 7后出现fsockopen错误所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。