Home > Archive > PHP Installation > April 2004 > imap-c-client installed, but not working as expected, undefined functions,
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
imap-c-client installed, but not working as expected, undefined functions,
|
|
| Development - Multi.Art.Studio 2004-04-28, 8:32 pm |
| hello to all,
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.
my script looks like:
$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)
mail-log says:
==> /home/LOGS/MAIL/maillog <==
tomcat imapd: Connection, ip=[::ffff:MYIP]
tomcat imapd: LOGOUT, ip=[::ffff:MYIP]
--
not wondering why login fails.....
there was NO login into imap... no username given
--
normally logfile looks like:
==> /home/LOGS/MAIL/maillog <==
tomcat imaod: Connection, ip=[::ffff:217.175.253.115]
tomcat imapd: LOGIN, user=m000000-410, ip=[::ffff:217.175.253.115]
tomcat imapd: LOGOUT, user=m000000-410, ip=[::ffff:217.175.253.115],
top=0, retr=0
normally there is also a LOGIN before LOGOUT, also the username is
missing....
ok, i use pop3, and hope imap functions can work on it ;) dont know.....
i try to get quota from server:
....
$quota = imap_get_quotaroot($mbox, "INBOX");
or
$quota = imap_get_quota($mbox, "INBOX");
.....
and php tells me:
*Fatal error*: Call to undefined function: imap_get_quotaroot()
but why? php.net says:
This function is currently only available to users of the c-client2000
or greater library.
and i have installed he library and compiled static into php, php static
into apache, everythings working very well, except my own imap scripts ;)
it seems that some of the functions may not be implemented anymore or
not yet? maybe i did something wrong....
thanks in advance for any kind of help and hints, tips :)
a bug in php?
yours sincerely
volker
|
|
|
|
|