Forum Moderators: coopster
This line of code is doing it:
$inbox = imap_open('{localhost:143}INBOX', 'username', 'password'); And no, I'm not actually using 'username' and 'password'. ;)
I'm running PHP 4.3.1 compiled with the imap c-Client. I've also tried using imap_open with pop3 protocol, which doesn't solve the problem. I also can't get imap_open to return an error as long as the variables are valid, even with "or die(...." statements. The status of the mailbox (full, empty...) seems to be irrelevent. I've tried mail.mydomain.com for server name, IPs, etc.
So since my code works sometimes, I think the fault is either with PHP or the server. I've noticed that loading my test page that runs this code on Netscape makes the browser try to keep connecting/reloading, while IE6 just gives a DNS error. I can strip my code down to that one line and it acts the same.
So, any ideas?
Have you tried to get it to return an error with error_reporting (E_ALL); [ca3.php.net].
I can't think of anything else really. The intermittent problems are the worst.