PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Networking » Net_IMAP » Bug #7289

Errors in parsing response

Details

Submitted2006-04-04 13:47 UTC
Fromala dot ibrahim at gmail dot com
Assignedamistry
StatusNo Feedback
PackageNet_IMAP
PHP Version5.1.2
OSLinux 2.6.12
Roadmaps(Not assigned)

Comments

[2006-04-04 13:47 UTC] ala dot ibrahim at gmail dot com

Description:
------------
I get an error when I'm using the cmdFetch for the body.peek[header.fields (to)] and body.peek[header.fields (from)] and body.peek[header.fields (date)]
Error is like 2796,/usr/local/lib/php/Net/IMAPProtocol.php,PROTOCOL ERROR!:UNIMPLEMMENTED! I don't know the parameter 'DATE' !!!
2908,/usr/local/lib/php/Net/IMAPProtocol.php,PROTOCOL ERROR!:PARSE ERROR!!! must be a '\r\n' here but is a ']'!!!! (getting the next line)|STR:| {41}
Date: Mon, 27 Mar 2006 10:53:22 +0000

Test script:
---------------
<?php
require_once('Net/IMAP.php');
$imap = new Net_IMAPProtocol();
$imap->cmdConnect($mailhost,$mailport);
$imap->cmdLogin("$username@$domain" , $password);
$selectInbox = $imap->cmdSelect($mailbox);
/*** Error Comes Here ***/
$nsarray = $imap->cmdFetch('1:*','(uid body.peek[header.fields (to)])');

print "<pre>"; var_dump($nsarray); print "</pre>";
$imap->cmdLogout();
?>

Actual result:
--------------
2519,/usr/local/lib/php/Net/IMAPProtocol.php,PROTOCOL ERROR!:must be a ' ' but is a ')' !!!!
2796,/usr/local/lib/php/Net/IMAPProtocol.php,PROTOCOL ERROR!:UNIMPLEMMENTED! I don't know the parameter 'TO: MAKTOOB_T@EMIRATES.NET.AE

' !!!
2519,/usr/local/lib/php/Net/IMAPProtocol.php,PROTOCOL ERROR!:must be a ' ' but is a ')' !!!!
2796,/usr/local/lib/php/Net/IMAPProtocol.php,PROTOCOL ERROR!:UNIMPLEMMENTED! I don't know the parameter 'TO: MAKTOOB_T@EIM.AE

' !!!
2519,/usr/local/lib/php/Net/IMAPProtocol.php,PROTOCOL ERROR!:must be a ' ' but is a ')' !!!!
2796,/usr/local/lib/php/Net/IMAPProtocol.php,PROTOCOL ERROR!:UNIMPLEMMENTED! I don't know the parameter 'TO: MAKTOOB_T@EIM.AE, YAZAN DARADKEH <YAZAN_DAR@MAKTOOB.COM>

' !!!
<pre>array(2) {
["RESPONSE"]=>
array(3) {
["CODE"]=>
string(2) "OK"
["STR_CODE"]=>
string(9) "Completed"
["CMDID"]=>
string(5) "A0003"
}
["PARSED"]=>
array(3) {
[0]=>
array(3) {
["COMMAND"]=>
string(5) "FETCH"
["NRO"]=>
string(1) "1"
["EXT"]=>
array(3) {
["UID"]=>
string(5) "13101"
["BODY[HEADER.FIELDS"]=>
array(2) {
["CONTENT"]=>
string(1) "("
["CONTENT_SIZE"]=>
int(1)
}
["TO"]=>
string(1) "]"
}
}
[1]=>
array(3) {
["COMMAND"]=>
string(5) "FETCH"
["NRO"]=>
string(1) "2"
["EXT"]=>
array(3) {
["UID"]=>
string(5) "13141"
["BODY[HEADER.FIELDS"]=>
array(2) {
["CONTENT"]=>
string(1) "("
["CONTENT_SIZE"]=>
int(1)
}
["TO"]=>
string(1) "]"
}
}
[2]=>
array(3) {
["COMMAND"]=>
string(5) "FETCH"
["NRO"]=>
string(1) "3"
["EXT"]=>
array(3) {
["UID"]=>
string(5) "14829"
["BODY[HEADER.FIELDS"]=>
array(2) {
["CONTENT"]=>
string(1) "("
["CONTENT_SIZE"]=>
int(1)
}
["TO"]=>
string(1) "]"
}
}
}
}
</pre>

[2006-12-11 16:51 UTC] amistry at php dot net

Does this problem still exist in the CVS version?