#23264 [Opn->Fbk]: readfile with Apache2+PHP 4.3.1 generates unwanted "xx sec.<br>" text

From: Date: Fri, 18 Apr 2003 02:36:21 +0000
Subject: #23264 [Opn->Fbk]: readfile with Apache2+PHP 4.3.1 generates unwanted "xx sec.<br>" text
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-37833@lists.php.net to get a copy of this message
ID: 23264 Updated by: moriyoshi@php.net Reported By: angelo at ispltd dot com -Status: Open +Status: Feedback Bug Type: Output Control Operating System: Linux PHP Version: 4.3.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: ------------------------------------------------------------------------ [2003-04-17 15:56:35] angelo at ispltd dot com I upgraded my server from Apache 1.3.20 and PHP 4.0.6 to Apache 2.0.44 and PHP 4.3.1. Now my app which was working does not, and I can't figure out why. The code generating output is simply this: header("Content-type: application/pdf"); $bytes = @readfile($fulldoc); Those two lines are back-to-back, and the "header" has to be first or I would get an error, so I know there's nothing else in the output stream. With Mozilla there are no problems, but with MSIE the PDF document will load once then on subsequent reloads it displays "### sec.<br>" ("###" being an integer) before file's actual content. This causes MSIE to display the unformatted (raw) content of the PDF file. Apparently this is showing the number of seconds for something? If I keep clicking back-arrow then reload the PDF file, the number of seconds keeps increasing. Once 60 seconds has elapsed since the first load, it again loads properly. So I can go back-and-forth (back-arrow, click the document, back-arrow, click the document) and watch the seconds rise, then it reaches 60 and the document again displays properly using Acrobat. I've tried readfile() with "@" and with & without assigning result to a variable; no difference. I am running a mostly "stock" PHP.INI file copied from the "recommended" distribution file -- I just changed "safe_mode" to and "expose_php" to "Off" and "register_globals" to "On". My configure line is as follows: ./configure --prefix=/usr/share --datadir=/usr/share/php --bindir=/usr/bin --libdir=/usr/share --with-config-file-path=/etc --with-exec-dir=/usr/lib/php/bin --with-mysql=/usr --with-gd=yes --enable-gd-native-ttf --enable-gd-imgstrttf --with-tiff-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-zlib=yes --with-bz2 --with-gmp --with-xml --with-ttf --with-t1lib --with-mcal=/usr --with-imap=yes --with-sablot --with-readline --with-ftp --with-ndbm --with-gdbm --with-mcrypt --with-gettext --with-mm --with-gd=yes --enable-versioning --enable-yp --enable-bcmath --enable-trans-sid --enable-inline-optimization --enable-track-vars --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-calendar --enable-ftp --enable-memory-limit --enable-force-cgi-redirect --with-openssl --with-curl --with-imap-ssl --with-gd=yes --with-apxs2=/usr/local/apache2/bin/apxs --with-snmp --disable-ipv6 --with-pear Thank you in advance for any help in solving this. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23264&edit=1

« previous php.bugs (#37833) next »