PHP IMAP 连接到服务器超时
我正在使用 PHP 编写非常简单的电子邮件客户端应用程序。在我的本地开发服务器上,一切正常,但是当我在生产服务器上移动相同的脚本时,我收到“无法连接到 secure.emailsrvr.com,993:连接超时”响应。我几乎尝试了一切,搜索了两天谷歌,但没有找到解决方案!
两台服务器的配置完全相同,因此没有问题! phpinfo() 完全相同(启用 imap、ssl...包括所有扩展、服务器日志没有错误)
用户名、密码和服务器数据相同且 100% 正确(如果我更改凭据或服务器数据)我得到正确的错误而不是超时)。服务器支持人员向我保证 IP 没有被阻止。
我使用的非常简单的连接脚本(这就是它被卡住的地方)。端口正确,主机也正确!
$mbox=imap_open("{imap.emailsrvr.com:993/imap/ssl}INBOX", "my_user", "my_pass");
有人遇到过类似的问题吗?
问候, 耶内·戈洛利西奇
I'm coding very simple email client app with PHP. On my local dev server everything works just fine, but when I move the very same script on production server I get the "Can't connect to secure.emailsrvr.com,993: Connection timed out" response. I tried almost everything, searching the google for two days, but no solution found!
Both servers have the exact configuration, so there is no issues with that! phpinfo() is exactly the same (imap enabled, ssl, ... all extensions are included, server log has no errors)
The username, password and server data is the same and 100% correct (if I change the credentials or server data I get correct error and not timeout). The server support guys assured me the the IP is not blocked.
very simple connect script that I use (here is where it get stucked). Port is correct, also host!
$mbox=imap_open("{imap.emailsrvr.com:993/imap/ssl}INBOX", "my_user", "my_pass");
Anyone had similar issues?
Regards,
Jernej Gololicic
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的操作系统不同,则很可能您也安装了不同的 IMAP 扩展。
看看这个: http://www.php.net/manual/en/imap .requirements.php
If your OSes are different than it's most probably that you have different IMAP extensions installed as well.
Check this out: http://www.php.net/manual/en/imap.requirements.php