Imap_open dies when called

I have the following code:

type "foo";
imap_open ("{localhost: 143 / imap / notls}", "myname", "mypass");
print "bar";

the script is dying. I get null responses, nothing from apache, no "foo" or "bar", nothing.

However, I can connect to the imap server (nc localhost ...), I can also put the script on another server and connect to the same IMAP server. So, I think something is wrong with php on this server. But I can’t understand what I’m missing, forgot or not installed. phpinfo () tells me php is configured with --with-imap and --with-imap-ssl. OS - CentOS, by the way.

+3
source share
1 answer

Hm, sorry ... So, the answer is: :)

Ok, found a problem. libc_client was compiled against the header file with the value set to FD_SETSIZE. When this server is a shared hosting server, it crashed because there were too many open file descriptors ... Recompiling libc_client did the trick

+2
source

Source: https://habr.com/ru/post/1744011/


All Articles