#23264 [NEW]: readfile with Apache2+PHP 4.3.1 generates unwanted "xx sec.<br>" text
| From: | angelo at ispltd dot com | Date: | Thu, 17 Apr 2003 20:56:36 +0000 |
| Subject: | #23264 [NEW]: readfile with Apache2+PHP 4.3.1 generates unwanted "xx sec.<br>" text | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-37827@lists.php.net to get a copy of this message | ||
From: angelo at ispltd dot com
Operating system: Linux
PHP version: 4.3.1
PHP Bug Type: Output Control
Bug description: readfile with Apache2+PHP 4.3.1 generates unwanted "xx sec.<br>"
text
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 bug report at http://bugs.php.net/?id=23264&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23264&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23264&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23264&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23264&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23264&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23264&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23264&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23264&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23264&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23264&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23264&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23264&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23264&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23264&r=gnused