ID: 27490
Updated by: [EMAIL PROTECTED]
Reported By: mortoray at ecircle-ag dot com
-Status: Open
+Status: Feedback
Bug Type: Zlib Related
Operating System: Windows NT 5.0 build 219
PHP Version: 4.3.4
New Comment:
Does it work if you set the header yourself with:
header('Content-Encoding: gzip');
?
regards,
Derick
Previous Comments:
------------------------------------------------------------------------
[2004-03-04 04:11:45] mortoray at ecircle-ag dot com
Description:
------------
Using the zlib.output_compression=On and the function system() produces
garbage output to the browser. Specifically, it does a gzip encoding
but omits the "Content-Encoding: gzip" header.
Using "passthru" instead of "system" works as intended.
Turning off compression and using "system" works as intended.
Reproduce code:
---------------
<?php
//in php.ini set zlib.output_compression=On
//replace system with passthru to make it work
system( "cmd.exe /c dir" );
?>
Expected result:
----------------
Either system() should somehow turn off the zlib compression or its
output should be compressed properly and the proper headers should be
set.
--TCP Flow with passthru()--
GET /dir.php HTTP/1.0
Host: qatest.ecircle.de:8080
Accept: text/*, image/jpeg, image/png, image/*, */*
Accept-Charset: iso-8859-1, utf-8;q=0.5, *;q=0.5
Accept-Encoding: x-gzip, x-deflate, gzip, deflate, identity
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.1; Linux; en_US, en)
HTTP/1.1 200 OK
Date: Thu, 04 Mar 2004 09:12:41 GMT
Server: Apache/2.0.45 (Win32) PHP/4.3.4
X-Powered-By: PHP/4.3.4
Content-Encoding: gzip
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=ISO-8859-1
...........S=O.0..+.?...X.J.-..dAbb`...kk5q...e..sm.
m"q.....{.C.....5....c...1,!..b
....}.MYb.p{..Ks.....x...._x.....2....5..!......5..I.5..._..........?.."a\.B........|......j....i...Iw..*....i.........[yE..
.-.~N.W.'.Xmy....).........7V.n.,sE.....ye....r.I||...c..4...?f...Y.....gW....h!..h.....);?.v...O.:H.A1...U6.^..6......z.......d..g...5..nz.M.XWaM..o%.......>..7
..5.c....y....6.K.aB......f..p.
......`...
...
Actual result:
--------------
--TCP Flow with system()--
GET /dir.php HTTP/1.0
Host: qatest.ecircle.de:8080
Accept: text/*, image/jpeg, image/png, image/*, */*
Accept-Charset: iso-8859-1, utf-8;q=0.5, *;q=0.5
Accept-Encoding: x-gzip, x-deflate, gzip, deflate, identity
Accept-Language: en
Cache-control: no-cache
Pragma: no-cache
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.1; Linux; en_US, en)
HTTP/1.1 200 OK
Date: Thu, 04 Mar 2004 09:13:45 GMT
Server: Apache/2.0.45 (Win32) PHP/4.3.4
X-Powered-By: PHP/4.3.4
Connection: close
Content-Type: text/html; charset=ISO-8859-1
...........S.n.0..#..{..X.....J.\*..CO\...E..........B"un.ggggc...Ma..hA.x.........+.r.nUO..2.!..U..F...".'.o...h.....$...:.9.L..u`q...$.
@.Pxp.s....W..3.*|...*B...t.)H..,S.....vK..*.J..A.gYn..T.$L.=...8..Q.....I{......7X.]A..)M,..g3<.=^_0.uZZ..^.........#..M..L.wPL....).N.V.!;..A....l!o.(Q....)k3.O.....u.5..
..i.O....M.$N.q.....K4 >[EMAIL PROTECTED]|....{...P.0.......>......6...
%.78....n.~..........C
...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27490&edit=1