imap_open失败,导致无法创建可选择的TCP套接字 [英] imap_open fails giving Unable to create selectable TCP socket

查看:140
本文介绍了imap_open失败,导致无法创建可选择的TCP套接字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下代码

$mbox = imap_open("{mail.mydomain.com:143/imap/notls}INBOX", "newsletter@mydomain.com","xxxxxxx");

 if ($mbox)
 {
  echo "connected";
  imap_close($mbox);
 }
 else
 {
  echo "not connected :<br>" . imap_last_error();
 }

它给出了这个输出

   not connected :
   Unable to create selectable TCP socket (1919 >= 1024)

我能够使用以下方式远程登录到域 telnet mail.mydomain.com 443

I am able to telnet to the domain, using telnet mail.mydomain.com 443

   A LOGIN username password
   A OK LOGIN Ok

我的PHP代码有什么问题?

What is wrong with my PHP code?

推荐答案

似乎必须使用较大的FD_SETSIZE重新编译PHP.它似乎与您的系统不匹配.您的系统返回的句柄大于1024,但是PHP认为套接字句柄最多只能使用1024.

It appears PHP must be recompiled with a larger FD_SETSIZE. It appears to be mismatched to your system. Your system returns handle larger than 1024, but PHP thinks socket handles can only go up to 1024.

这篇关于imap_open失败,导致无法创建可选择的TCP套接字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆