Re: imap_open() fails with CouirerIMAP
| From: | Development - multi.art.studio | Date: | Mon, 26 Apr 2004 15:09:12 +0000 |
| Subject: | Re: imap_open() fails with CouirerIMAP | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184663@lists.php.net to get a copy of this message | ||
hi,
try login via pop and everything is fine, but this doesnt solve the 'bug'
i also tried, because of my get_quota script...and some tests
if use the script below, servers tells me
*Warning*: imap_open(): Couldn't open stream {127.0.0.1:143/notls}INBOX in */... .php* on line *2*
Connection failed to 127.0.0.1,143: Connection refused
i ave courier 2.2 with tls/ssl installed, working fine.
also imap c-client 2000c- v4.1 is installed in php statically, and php in apache compiled also statical.
i also see there was a bugreport regarding to this, about imp, buit this was not solved and marked as junk.
also other basic imap functions seems not to work. (see my posting about imap-cclient problem and php in this list with an example script and lots of infos.)
any help would be greatly appreciated,
yours sincerely
volker
Elfyn McBratney wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 10 Apr 2004 23:42, Pembo13 wrote:Well I've setup a reltively simple code block: function mailboxmsginfo($mailbox='INBOX', $username, $password) { $username = $username."@dalive.com"; $imap_stream = "{localhost:143/notls}".$mailbox; $mbox = imap_open($imap_stream, $username, $password)OK, can you try this: <?php $mbox = imap_open('{127.0.0.1:143/notls)INBOX', 'user', 'pass')or die("can't connect ($username with $password): " .imap_last_error()); $check = imap_mailboxmsginfo($mbox); imap_close($mbox); return $check; }or die(imap_last_error());echo("Connected..\n"); imap_close($mbox); ?> (If courier isn't compiled with SSL/TLS support, drop the '/notls'.) Also have a look at the docs/comments here: <http://www.php.net/manual/en/function.imap-open.php>Client side I get (from imap_last_error): Can not authenticate to IMAP server: Authentication failed. Serverside, from Courier's logs i see the commands that differ from what normally comes from my mail clients. The normal mail client commands are of the format: imapd: Connection, ip=[::ffff:192.168.100.11], command=LOGIN imapd: LOGIN: DEBUG: ip=[::ffff:192.168.100.11], username=myusername imapd: LOGIN: DEBUG: ip=[::ffff:192.168.100.11], password=mypassword imapd: LOGIN, user=myusername@domain.tld, ip=[::ffff:192.168.100.11], protocol=IMAP while the commands as a result of the PHP funcion are of the format: imapd: Connection, ip=[::ffff:192.168.100.11], command=LOGIN imapd: LOGIN: DEBUG: ip=[::ffff:192.168.100.11], command=AUTHENTICATE imapd: LOGIN: DEBUG: ip=[::ffff:192.168.100.11], command=LOGOUT imapd: LOGOUT, ip=[::ffff:192.168.100.11]hrmm..no.. anyone? 8) Elfyn - -- Elfyn McBratney, EMCB mailto:elfyn@emcb.co.uk http://www.emcb.co.uk/ PGP Key ID: 0x456548B4 PGP Key Fingerprint: 29D5 91BB 8748 7CC9 650F 31FE 6888 0C2A 4565 48B4 "When I say something, I put my name next to it." -- Isaac Jaffee<< ~ Linux london 2.6.5-emcb-241 #2 i686 GNU/Linux ~ >>~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAeJowaIgMKkVlSLQRAvAhAKCV+oLhJbjE6IrsPEA3SAq4+1cNHACfdu4t LHJsC3JzuVKeR8FeI0J8oWY= =fmBO -----END PGP SIGNATURE-----~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<