note 109786 added to book.apc

From: Date: Tue, 21 Aug 2012 01:51:09 +0000
Subject: note 109786 added to book.apc
Groups: php.notes 
Request: Send a blank email to php-notes+get-190147@lists.php.net to get a copy of this message
On some of my servers, apc.php renders corrupt PNG graphics by sticking carriage returns in the graphics file. I see that apc.php renders it's web page and graphics on the fly as a stream achieved via print/echo commands. On the problem servers the print/echo commands automatically stick a carriage return after every execution. This is probably because the output stream is not opened in binary mode but in text mode. If rendering just HTML then either mode will work, but because the apc.php script draws PNG images then if the output is not in binary mode the PNG file creation gets corrupted with carriage returns and the resulting image fails on a browser. I've compared the configs/libraries/packages relating to PHP and Apache between a working and problem server and they are exactly the same. Can anyone provide some further insight as to where to look? ---- Server IP: 69.147.83.197 Probable Submitter: 202.6.86.1 ---- Manual Page -- http://www.php.net/manual/en/book.apc.php Edit -- https://master.php.net/note/edit/109786 Del: integrated -- https://master.php.net/note/delete/109786/integrated Del: useless -- https://master.php.net/note/delete/109786/useless Del: bad code -- https://master.php.net/note/delete/109786/bad+code Del: spam -- https://master.php.net/note/delete/109786/spam Del: non-english -- https://master.php.net/note/delete/109786/non-english Del: in docs -- https://master.php.net/note/delete/109786/in+docs Del: other reasons-- https://master.php.net/note/delete/109786 Reject -- https://master.php.net/note/reject/109786 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#190147) next »