用户
 找回密码
 入住 CI 中国社区
搜索
查看: 3507|回复: 2
收起左侧

[服务器] Message: fsockopen(): unable to connect to smtp.163.com:25 (Connection timed...

[复制链接]
发表于 2017-4-6 16:16:45 | 显示全部楼层 |阅读模式
我们做了一个项目,其中需要用户邮箱验证,可是我每次在本机测试就是对的,上传服务器后就不对了,服务器上是Linux+nginx+MySQL+php环境,本机是Windows7+wamp环境,错误代码如下:
A PHP Error was encounteredSeverity: Warning
Message:  fsockopen(): unable to connect to smtp.126.com:25 (Permission denied)
Filename: libraries/Email.php
Line Number: 1689

A PHP Error was encounteredSeverity: Warning
Message:  fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846

A PHP Error was encounteredSeverity: Warning
Message:  fgets() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1869

A PHP Error was encounteredSeverity: Warning
Message:  fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846

A PHP Error was encounteredSeverity: Warning
Message:  fgets() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1869

A PHP Error was encounteredSeverity: Warning
Message:  fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846

A PHP Error was encounteredSeverity: Warning
Message:  fgets() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1869

A PHP Error was encounteredSeverity: Warning
Message:  fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846

A PHP Error was encounteredSeverity: Warning
Message:  fgets() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1869

A PHP Error was encounteredSeverity: Warning
Message:  fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846

A PHP Error was encounteredSeverity: Warning
Message:  fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846

A PHP Error was encounteredSeverity: Warning
Message:  fgets() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1869
发表于 2017-4-7 11:18:30 | 显示全部楼层
看起来是服务器有限制,你没有执行 fsockopen 的权限,建议用自己可以完全控制的服务器测试。

本版积分规则