While inside a session (eg user login), I'm using a PhP script to pass through any protected (only accessible after login) documents to the client. I'm currently using fpassthru( ) for this.
I am having trouble with passing through files to show them "inline" (have them opened by the user's browser).
A very small (eg 10-20 bytes or so) plain text file is shown without problems, a small jpeg image (about 3k) is shown only partially (eg only the top 10% or so), a gif image (about 30k) is not shown at all and a large pdf file is also not shown.
Does anyone have any idea what causes this behaviour? I'm guessing it's some kind of time out limit or file size limit, but I'm not sure what exactly. Do I need to adapt any php.ini or httpd.conf parameters? Or is it some HTML header that is causing this?
I'm using the headers as suggested in the php manual at the site
http://www.php.net/manual/en/function.fpassthru.php