Re: problems with imap, c-client2000 4.1 installed, but quota functions and most of imap fails
| From: | Development - multi.art.studio | Date: | Mon, 26 Apr 2004 14:12:34 +0000 |
| Subject: | Re: problems with imap, c-client2000 4.1 installed, but quota functions and most of imap fails | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184647@lists.php.net to get a copy of this message | ||
some additiional infos:
Apr 26 16:08:59 tomcat imapd: Connection, ip=[::ffff:MYIP]
Apr 26 16:08:59 tomcat imapd: LOGOUT, ip=[::ffff:MYIP]
tomcat is the hostname...
i told about squirrelmail, i looked up some functions, and imho they dont use php-internal-imapfunctions ;)
also i noticed that there was NO login into imap...
==> /home/LOGS/MAIL/maillog <==
Apr 26 16:09:00 tomcat imapd: Connection, ip=[::ffff:MYIP]
Apr 26 16:09:00 tomcat imapd: LOGOUT, ip=[::ffff:MYIP]
normally there is also a LOGIN before LOGOUT, also the username is missing....
a bug in php?
please help
volker
Development - multi.art.studio wrote:
hello,
i have some trouble using imap functions with php.
php 4.3 has been compiled with --with-imap and the imap-c-client2000 v4.1
phpinfo() tells me it includes imap client in v4.1 also.
also squirrelmail on 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 2.2 (but also on 1.4x this script fails)
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...., but squirrelmail with imap is ok .....hmmm
thanks in advance for any kind of help and hints, tips :)
yours sincerely
volker