|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-04-30 01:17 UTC] dev dot null at multiartstudio dot com
Description:
------------
hello to all,
sorry im coming up with that again, i saw and read other bugreports about that, but this doesnt solve my problem.
i tried to get help from the list, but its growing to fast as somebody will take acknowledge to my request.
also i searched the web, but this was not very useful.
i have some trouble using imap functions with php.
php 4.3.6 has been compiled with --with-imap=/usr/local
and the imap-c-client2004rc9 include files rfc822.h/mail.h/linkage.h where copied to /usr/local/include
phpinfo() tells me it has in version 4.1 also.
also courier-imap works fine.
now i tried to write a tool to get all accounts from database and login via imap to list the quotas.
Reproduce code:
---------------
$MAILSRV="MYIP:143/imap";
$mbox = imap_open ("{".$MAILSRV."}INBOX", "user", "pass")
or die("can't connect: " . imap_last_error());
...this is what i use to connect my imapserver, MYIP=xxx.xxx.xxx.xxx, oficial ip with ptr
but connection fails and server says:
*
Warning*: imap_open(): Couldn't open stream {217.175.253.115:143/imap}INBOX in */home/WWW/m000000/share/html/.testflug.de/imapquota.php* on line *3*
can't connect: Can not authenticate to IMAP server: Authentication failed.
but user and pass is the same as for pop3,
and if i use pop3 login:
$MAILSRV="MYIP:110/pop3";
then connecting the server goes well!
my imap server is courier 3.0.3 (but also on 1.4x and 2.x this script fails)
Expected result:
----------------
$MAILSRV="MYIP:143/imap";
$mbox = imap_open ("{".$MAILSRV."}INBOX", "user", "pass")
or die("can't connect: " . imap_last_error());
...this is what i use to connect my imapserver, MYIP=xxx.xxx.xxx.xxx, oficial ip with ptr
but connection fails and server says:
*
Warning*: imap_open(): Couldn't open stream {217.175.253.115:143/imap}INBOX in */home/WWW/m000000/share/html/.testflug.de/imapquota.php* on line *3*
can't connect: Can not authenticate to IMAP server: Authentication failed.
but user and pass is the same as for pop3,
and if i use pop3 login:
$MAILSRV="MYIP:110/pop3";
then connecting the server goes well!
my imap server is courier 3.0.3 (but also on 1.4x and 2.x this script fails)
Actual result:
--------------
yours sincerely
volker
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 21:00:01 2025 UTC |
Hello again, i now solved the problem of the undefined functions. it was because c-client brings some include-files, and also have some other stuff in it, so linking the header files to /usr/local/include is not everything, you better compile php by gving it the source directory of c-client and add symlinks for include and lib.... some of this is mentioned at the php-site user comments for c.-client. but this didnt fix the problem of broken imap connections. i itested everything posted on php.net comments for imap_open etc. but with php 4.3.6 and c-client, imap connections fails for the same user for who pop3 login works fine. user can access imap through any client etc, but not with imap. the log output of php and courier shows the error (bug), php doesnt give a username to the imap daemon, here is what it looks like: (username is missing at all with imap and php) ==> /home/LOGS/PHP/php.log <== [03-May-2004 00:53:28] PHP Warning: imap_open(): Couldn't open stream {MYIP:143/imap/novalidate-cert}INBOX in /somePath/recycle.php on line 40 more errors follow....because of broken connection! mailog of courier says: ==> /home/LOGS/MAIL/maillog <== May 3 00:53:28 tomcat imapd: Connection, ip=[::ffff:MYIP] May 3 00:53:28 tomcat imapd: LOGIN: DEBUG: ip=[::ffff:MYIP], command=STARTTLS May 3 00:53:28 tomcat imapd: LOGIN: DEBUG: ip=[::ffff:MYIP], command=CAPABILITY May 3 00:53:28 tomcat imapd: LOGIN: DEBUG: ip=[::ffff:MYIP], command=AUTHENTICATE May 3 00:53:28 tomcat imapd: LOGIN: DEBUG: ip=[::ffff:MYIP], command=LOGOUT May 3 00:53:28 tomcat imapd: LOGOUT, ip=[::ffff:MYIP] normally! there is a username logged! like so: ==> /home/LOGS/MAIL/maillog <== May 3 01:03:13 tomcat imapd: Connection, ip=[::ffff:MYIP] May 3 01:03:13 tomcat imapd: LOGIN: DEBUG: ip=[::ffff:MYIP], command=CAPABILITY May 3 01:03:26 tomcat imapd: LOGIN: DEBUG: ip=[::ffff:MYIP], command=LOGIN May 3 01:03:26 tomcat imapd: LOGIN: DEBUG: ip=[::ffff:MYIP], username=m000000-400 May 3 01:03:26 tomcat imapd: LOGIN, user=m000000-400, ip=[::ffff:MYIP], protocol=IMAP is this still a bug in php? any comments would be greatly appreciated, i would be grateful if you can send any comments, because there many users having the same problem outside here in the world ;) yours sincerely volker