I ended up capturing the network traffic of one of these sessions and
found this:

RC sends: "s SORT (DATE) US-ASCII ALL " (note the trailing space)
Server responds: "s BAD Invalid Search criteria."

Unlike when I tested manually, the command fails. It turns out to be due
to the trailing space(!).


I've attached a patch for this part of the problem.

(Changes
$command = 's SORT ('.$field.') US-ASCII ALL '."$add\r\n";
to
$command = 's SORT ('.$field.') US-ASCII ALL'.($add?' ':'')."$add\r\n";)


But now I get a blank page (quickly!) and the following in logs/errors:

[21-Apr-2006 00:31:28] PHP Fatal error:  Allowed memory size of 8388608
bytes exhausted (tried to allocate 35 bytes)
in /shares/www/webmail.foo.bar/roundcubetest/program/include/rcube_imap.inc on 
line 786

Is there any way of making RC consume less memory while doing this?


/Håkan Lindqvist
diff -urN roundcube/program/lib/imap.inc roundcubetest/program/lib/imap.inc
--- roundcube/program/lib/imap.inc	2006-03-27 21:06:30.000000000 +0200
+++ roundcubetest/program/lib/imap.inc	2006-04-21 00:27:57.000000000 +0200
@@ -638,7 +638,8 @@
 	if (!$fields[$field]) return false;
 	
 	$fp = $conn->fp;
-	$command = 's SORT ('.$field.') US-ASCII ALL '."$add\r\n";
+	//$command = 's SORT ('.$field.') US-ASCII ALL '."$add\r\n";
+	$command = 's SORT ('.$field.') US-ASCII ALL'.($add?' ':'')."$add\r\n";
 	$line = $data = '';
 	
 	if (!fputs($fp, $command)) return false;
@@ -2079,4 +2080,4 @@
 	return (iil_C_Expunge($conn, $folder) >= 0);
 }

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to