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

From: Date: Thu, 24 Apr 2003 19:57:18 +0000
Subject: #23264 [NoF->Opn]: 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-38335@lists.php.net to get a copy of this message
ID: 23264 User updated by: angelo at ispltd dot com Reported By: angelo at ispltd dot com -Status: No Feedback +Status: Open Bug Type: Output Control Operating System: Linux PHP Version: 4.3.1 New Comment: I downloaded the latest snapshot (200304241730) and installed it. No improvement; problem still exists. I tried this: header("Content-type: text/plain"); echo "test"; and it opens in the Linux Advanced Editor, showing the same "xx sec.<br>" message at the top of the file; after 60 seconds the counter resets. My client tried accessing the document on two different computers and found the same situation exists, so it's not a user-specific problem. Could there be some debugging code that got left somewhere? Previous Comments: ------------------------------------------------------------------------ [2003-04-23 00:18:53] sniper@php.net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ------------------------------------------------------------------------ [2003-04-17 21:36:20] moriyoshi@php.net 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 ------------------------------------------------------------------------ [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 (#38335) next »