php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18627 Broken imap_get_quota() with Cyrus
Submitted: 2002-07-29 13:43 UTC Modified: 2002-07-31 04:43 UTC
From: rudib at email dot si Assigned:
Status: Closed Package: IMAP related
PHP Version: 4.3.0-dev OS: Linux
Private report: No CVE-ID: None
 [2002-07-29 13:43 UTC] rudib at email dot si
imap_get_quota() returns an array with key 'STORAGE'. However, "garbage" follows in the value of the key.

Sample script:

--

<?php

$imap = imap_open('{localhost:143}', 'cyrus', 'aa');
$quota = imap_get_quota($imap, 'user.test');

var_dump($quota);

if (isset($quota['STORAGE'])) {
	print 'set!';
}

?>

-- 

"Sample" output: 

array(1) { ["STORAGEAMESPACE"]=> array(2) { ["usage"]=> int(1) ["limit"]=> int(10000) } }


Tho, sometimes, "STORAGE" is correctly set. :)

I know that this has been mentioned in the CVS logs, but I'd really like a fix for this. ;)

Thanks.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-29 14:15 UTC] kalowsky@php.net
what do you mean it's filled with "garbage"?
 [2002-07-29 16:33 UTC] rudib at email dot si
Some of the returned array keys:

STORAGEIDLE
STORAGEREAD=REFE!
STORAGEILDREN
STORAGELBOX-REFEA
STORAGE

They change each time I re-run the script. I know, it's weird.
 [2002-07-29 18:09 UTC] kalowsky@php.net
try as I might to reproduce this, I can't.  I get no such errors, only the same data each time.  Could it be your build of c-client by any chance?  
 [2002-07-29 19:47 UTC] sniper@php.net
Was this with PHP 4.3.0-dev ? (just want to be sure..)

 [2002-07-29 22:44 UTC] kalowsky@php.net
Was what with 4.3.0-dev?  

My testing?  It's from CVS head.  His snapshot is from a 4.3 snapshot.  
 [2002-07-30 10:10 UTC] rudib at email dot si
Uh... I can't reproduce this from the CLI ... Also upgraded to c-client 2002 RC2 ... Yes, I'm using PHP from CVS HEAD :)

Next suspect: Apache. :)
 [2002-07-31 04:43 UTC] rudib at email dot si
Actually, this was a bug, no matter if it was run from CLI or Apache.

Now it's fixed in CVS. Thanks Dan!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 08:01:32 2024 UTC