[imp] quota hook and IMAP c-Client version
Roman Serbski
libser@manas.kg
Mon, 04 Feb 2002 09:38:23 +0500
Hi again
I'm still trying to get imp_show_quota function to work but with no
success yet. I tried to test it with small example provided in PHP manual:
<?php
$mbox = imap_open("{my.domain.com:993/imap/ssl/novalidate-cert}",
"user", "xxxxx", OP_HALFOPEN) or die("can't connect: ".imap_last_error());
$quota_value = imap_get_quota($mbox, "user");
if (is_array($quota_value)) {
print "Usage level is: " . $quota_value['usage'];
print "Limit level is: " . $quota_value['limit'];
}
imap_close($mbox);
?>
This example gives me the same error:
Warning: c-client imap_getquota failed in
/usr/local/apache/htdocs/test.php on line 4
Line 4 is exactly where imap_get_quota called, so I suppose something is
definitely wrong with my c-Client. Could someone running latest
Courier-IMAP and c-Client-2001 test this example?
Looking forward to hear from you.
Regards,
Roman
Roman Serbski wrote:
> Morning list.
>
> I have some strange trouble with implementing quota hook. Any help would
> be greatly appreciated.
> Horde 2.0/IMP 3.0
> qmail 1.03 + Vpopmail 5.1.10 (using Maildir++)
> Courier-IMAP 1.4.0
> PHP 4.2.0-dev
> IMAP c-Client 2001 + compiled with SSL support
>
> I was planning to use quota hook as described in
> horde/imp/config/conf.php. First time I had same symptoms as was
> mentioned by Gregorio Faraldo several days ago - there was no any info
> about quota usage.
> After some debugging imp_show_quota function (changing $quota =
> @imap_get_quota($stream, 'ROOT'); to $quota = imap_get_quota($stream,
> 'ROOT'); gave me the right error I guess :-) I have this error:
>
> Warning: c-client imap_getquota failed in
> /usr/local/apache/htdocs/horde/imp/config/conf.php on line 344
>
> Could someone who successfully installed quota hook provide some info
> about version of c-Client and /maybe/ extra hints/requirements while
> compiling php/c-client/courier-imap(???) to use quota hook? Or maybe the
> problem is that I use IMAP-SSL connections *ONLY*?
>
> I also checked imap_get_quota PHP manual - it says:
> This function is currently only available to users of the c-client2000
> library. Does it mean that it works with c-client2000 *ONLY* - what
> about 2001?
>
> To be sure I tried to telnet to my mail server and use getquota -
> everything works fine, Courier-IMAP returns my quota usage/quota size.
>
> Thank you for your help.
>
> Regards,
> Roman
>
--
9:00AM up 17 mins, 2 users, load averages: 0.14, 0.08, 0.04