|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-04-17 15:56 UTC] 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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 12:00:01 2025 UTC |
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?