Subject: imap_get_quota and c-client

From: Roman Serbski <[email-masked]>
Date: Tue, 05 Feb 2002 12:25:47 +0500

Hi

I'm sorry if this question is off topic but I really don't know where to 
get help from.
I have troubles getting imap_get_quota function to work with PHP 4.1.1. 
I think my problem has something to do with version of c-client, I 
looked through c-client mailist archive and found rather old discussion 
about GETQUOTAROOT (there was some patch too, but I'm not sure if it has 
something in common with my problem).
Here is the small PHP program to get getquota response from IMAP server 
(this example was taken from 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, "ROOT");
     if (is_array($quota_value)) {
         print "Usage level is: " . $quota_value['usage'];
             print "Limit level is: " . $quota_value['limit'];
         }
imap_close($mbox);
?>

And here is the error I get:

Warning: c-client imap_getquota failed in /usr/local/apache/htdocs/b.php 
on line 4

I compiled PHP with imap support (using c-client-2001 compiled with SSL 
support), IMAP server is Courier-IMAP 1.4.2. If I telnet to mail server 
and use getquota command everything is fine - Courier-IMAP returns my 
quota usage and quota size. I also checked imap_get_quota PHP manual - 
it says:
This function is currently only available to users of the c-client2000 
library. Could it be the cause of my problems since I use c-client 2001?

Any help would be greatly appreciated.

Kind regards,
Roman

-- 
11:00AM  up  2:31, 3 users, load averages: 0.24, 0.20, 0.14

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------