I have a client site that displays PDFs in an i-frame. Occasionally when navigating to another php page from the page with the i-frame, instead of the php being parsed, the user is prompted to download the php file. It seems to happen more often in Mozilla, but does happen in MSIE also. There is no consistency to the problem- sometimes the pages display ok and other times they don't, going from the same pdf to the same php page.
I grabbed the headers from when the page works and when it doesn't. When the download prompt appears, there is nothing after this header line:
HTTP/1.x 200 OK
Here's the setup:
Linux RHE4
Apache/2.0.52 (Red Hat)
PHP 4.3.9
Running SSL
Here's the entire header:
this part is returned every time
GET /client_admin.php HTTP/1.1
Host: online.docublue.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://online.docublue.com/showdoc.php
Cookie: xxxxxxxxxxxxx; PHPSESSID=xxxxxxxx
HTTP/1.x 200 OK
this part is returned when the page works as expected, but not on requests when the download prompt appears *
Date: Tue, 17 Oct 2006 15:37:56 GMT
Server: Apache/2.0.52 (Red Hat)
X-Powered-By: PHP/4.3.9
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 3072
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=ISO-8859-1
Any help with this would be greatly appreciated- it's making me nuts (my client isn't real thrilled either!) I've checked the code and the server config- dunno what else to be looking at.