imap_open fails giving Unable to create selectable TCP socket

拟墨画扇 提交于 2019-12-20 03:55:19

问题


I have the following code

$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();
 }

It give this output

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

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

   A LOGIN username password
   A OK LOGIN Ok

What is wrong with my PHP code?


回答1:


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.



来源:https://stackoverflow.com/questions/18825764/imap-open-fails-giving-unable-to-create-selectable-tcp-socket

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!