Re: [PHP] how to read emails with php
On 4 December 2012 19:24, Farzan Dalaee farzan.dal...@gmail.com wrote: Warning: imap_open() [function.imap-open]: Couldn't open stream mail.mydomain.net:143/pop3INBOX in C:\xampp\htdocs\mail.php on line 6 this is my code $host = 'mail.mydomain.net:143/pop3'; $user = 'x...@mydomain.net'; $password = 'myPassword'; $mailbox = {$host}INBOX; ^^^ PHP interprets that as insert $host in string and removes the curly braces. Try $mailbox = {mail.mydomain.net:143/pop3}INBOX; Cheers, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: gettext() troubles
Hi Denis Gerasimov, you wrote: I am facing some troubles with gettext. ... putenv(LANG=ru_RU); Speaking from my experience, you need to use only ru there on Windows... setlocale (LC_ALL,ru); ...but you definitly have to use the Windows abbreviation for the corresponding locale in the setlocale call. Have a look at PEARs I18Nv2 module which attempts to solve this discrepancy. Regards, -- Michael - mike(@)php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imap_open() on windows extremely slow?
Hi, I wonder if anyone experienced the same as I did the last few days. If I call imap_open() on linux it takes less than 0.2s to return, but if I try that on windows it needs about 5s! to successfully connect to the imap server. Is this behaviour naturally? My connection string looks like the following: {ip.ip.ip.ip:143/imap/notls}INBOX Some technical details: Windows 2000SP4 PHP 4.3.8 Courier IMAP 0.45.6.20040712 on Debian no matter if CLI or Apache2 SAPI I'd really appreciate any comments, despite use $unixoidOS :) Thanks, -- Michael - mike(@)php.net signature.asc Description: OpenPGP digital signature
[PHP] Re: imap_open() on windows extremely slow?
Hi Raditha Dissanayake, you wrote: let me guess ip.ip.ip.ip=127.0.0.1 ? (when in linux) Yes, that's true. if yes this behaviour isn't really worth worrying about. So you say it'd take equally long to call imap_open() from a remote linux machine? 5 seconds seem far too long for me, though... Regards, -- Michael - mike(@)php.net signature.asc Description: OpenPGP digital signature
Re: [PHP] Re: imap_open() on windows extremely slow?
Hi Raditha Dissanayake, you wrote: What I am saying is that opening a socket connection has plenty of over heads whether it's imap or not. It's for this reason that most clients (mail or otherwise) keep the connection open for short durations even if no data is exchanged. Don't lose hair over these five seconds even though it appears to be a bit too long. bit too long !== far too long ;) Well, so here comes /the oddity/ connecting from debian to windows/exchange ~0.5 seconds connecting from debian to debian/courier ~0.2 (assumed to be somewhere at 0.x seconds) connecting from windows to debian/courier ~5 seconds connecting from windows to windows/exchange ~0.5 seconds Half a second is what I'd expect and is acceptable, but 5 seconds seems to be more serious than an oddity... Somewhat confused, -- Michael - mike(@)php.net signature.asc Description: OpenPGP digital signature
[PHP] Re: imap_open() on windows extremely slow?
Hi Michael Sims, you wrote: Anytime I see something like this, I suspect that the server (in this case, Courier IMAP) is attempting an ident lookup on the client, or is attempting a reverse DNS lookup. Well, Courier did already run with -nodnslookup -noidentlookup. It seems that it is waiting for a client bucket while select()'ing, you can see the relevant traces and tcpdumps here: http://s1-iw.iworks.at/ext.imap.txt Thanks, -- Michael - mike(@)php.net signature.asc Description: OpenPGP digital signature