6.0.0-beta1
9/24/25

[#4978] Docs: PHP compression should not be recommended if IMP is used.
Summary Docs: PHP compression should not be recommended if IMP is used.
Queue Horde Base
Queue Version 3.1.3
Type Enhancement
State Resolved
Priority 1. Low
Owners
Requester tansy (at) pacific (dot) net (dot) sg
Created 02/07/2007 (6804 days ago)
Due 11/30/2000 (9064 days ago)
Updated 02/09/2007 (6802 days ago)
Assigned
Resolved 02/09/2007 (6802 days ago)
Milestone
Patch No

History
02/09/2007 11:19:47 AM Jan Schneider Comment #6
State ⇒ Resolved
Due ⇒ 11/30/2000
Reply to this comment
I changed the docs to discourage output compression in PHP's configuration.
02/09/2007 12:57:46 AM tansy (at) pacific (dot) net (dot) sg Comment #5 Reply to this comment
Hi Jan,



Thanks. Enabling compression in Horde instead of doing so in php.ini 
does get it to work.



I believe lib/Horde/Browser.php is setting the Content-Length header 
(as mentioned at ~line 991) using the size of the attachment (this 
value is sent via IMP using strlen()).

[Show Quoted Text - 11 lines]
02/08/2007 09:26:26 AM Jan Schneider Comment #4
Due ⇒ 12/31/2006
Reply to this comment
May I ask where can I find this option?
It's not an option, compression is turned off unconditionally in 
imp/view.php. Of course this only work with compression enabled in 
Horde. I would think that PHP should change the Content-Length header 
if compression is turned on in PHP, anything else sounds like a PHP 
bug to me.
Are we doing something wrong?
Try enabling compression in Horde's configuration, not PHP's.
02/08/2007 12:33:06 AM tansy (at) pacific (dot) net (dot) sg Comment #3 Reply to this comment
Compression is already disabled in the scripts that download data.
Hi Jan,



May I ask where can I find this option?



The part of the code we are having trouble with is ~line 991 of 
lib/Horde/Browser.php where the Content-Length is set using header(). 
When this PHP function is called, the browser 'hangs' for a while when 
we try to download/view inline an attachment in IMP.



To keep zlib compression enabled in PHP, we had to either disable this 
header() line in PHP.



Are we doing something wrong?



Cheers.
02/07/2007 10:50:51 PM Jan Schneider Comment #2
Due ⇒ 01/31/2007
State ⇒ Feedback
Reply to this comment
Compression is already disabled in the scripts that download data.
02/07/2007 02:42:33 PM tansy (at) pacific (dot) net (dot) sg Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Docs: PHP compression should not be recommended if IMP is used.
Due ⇒ 02/28/2007
Queue ⇒ Horde Base
State ⇒ New
Reply to this comment
Hi,



http://www.horde.org/horde/docs/?f=PERFORMANCE.html



recommends PHP output compression.



However, if IMP was used, the compression may mess up the 
Content-Length: header used by the download/inline display of 
attachments. This is because the resultant file size being download is 
actually smaller than that of what is presented in Content-Length.



This may cause the client download to continue to anticipate more data 
from the web server when download has actually completed. In such a 
situation, the browser will appear to "hang".


Saved Queries