thetxt Posted May 18, 2007 Share Posted May 18, 2007 Hey! First off I would like to say that I resort to posting on a forum for help when I am at a complete loss... I have been using the same script for almost a year to check pop3 mails for user accounts on my server. It hasnt worked well since I first wrote it. Sometimes it connects and gets the mails fine but a lot of times it just hangs. It doesnt timeout or anything..it just hangs and the page keeps trying to load. Actually, if I want to use my site anymore, I have to restart the browser. here is the code i use to connect: $mbox_open = "{" . $server . ":110/pop3}INBOX"; $mbox = imap_open($mbox_open, $user, $password); ...where $server = mail.mysite.com My server is running php4. Is there a better/faster way to connect? If nothing else is there a way I can set it to timeout at least and retry? Thank you all for your help chris Quote Link to comment Share on other sites More sharing options...
s0c0 Posted May 19, 2007 Share Posted May 19, 2007 Sorry I've never even heard of this function until now. Crazy how many cool functions are built into php. Here's what I would do first in your situation. Change the max execution time in your php.ini file to something reasonable that way you will get a timeout error instead of having to close your browser when this thing hangs. Next try running the function without using the variables. Like they are doing in some of the examples here: http://us2.php.net/manual/en/function.imap-open.php Quote Link to comment Share on other sites More sharing options...
thetxt Posted May 19, 2007 Author Share Posted May 19, 2007 Thank you for your reply! I have read the php manual on impa_open and found no help there =/ As you suggested, I hardcoded the server into the function. Unfortunately I still have the same issues. The username and password will have to be variables obviously. Any and all suggestions are welcome. This is driving me insane! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.