PHP script will not display in a frame

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sierra467
Forum Newbie
Posts: 5
Joined: Tue Aug 07, 2007 10:58 am

PHP script will not display in a frame

Post by sierra467 »

Hello,

I have an index web page that is built with 2 frames - the left hand frame is called nav and the right hand page is called pgs. The Source for the nav frame is a html file named a.html and the source for the pgs frame is a php file called attribute.php. For some reason when the index page is displayed, the nav frame is displayed fine, but the pgs frame containing the PHP file will not display and I am receiving a dialog box from the browser:

Open attribute.php
You have chosen to open attribute.php which is a PHP script
What should Firefox do with this file?
() Open with:
() Save to Disk

All that the attribute.php file has in it is:

Code: Select all

<?php
print "Hello World";
?>
If I choose Open with and select Firefox, nothing happens and the dialog box just keeps coming back like an endless loop.

How do I get the php file to display in the pgs frame? or can I? Is the problem with Firefox?

Has anyone else had this problem? Also, I know frames are difficult and I should have tried something else - everyone keeps telling me that - but here I sit with my problem. If anyone can help other than suggesting not to use frames, I would appreciate it. Thanks.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Post by VladSun »

What is your WWW server?
There are 10 types of people in this world, those who understand binary and those who don't
sierra467
Forum Newbie
Posts: 5
Joined: Tue Aug 07, 2007 10:58 am

Post by sierra467 »

Apache is the www server.

I forgot to mention that the PHP file worked fine on its own, it is just when it is displayed in the context of frames.
sierra467
Forum Newbie
Posts: 5
Joined: Tue Aug 07, 2007 10:58 am

Post by sierra467 »

It now seems to be working. I have done nothing except reopen the site today after getting no ware yesterday. Must be the Ghost in the Machine, but I have no reason for it...... Anyone?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Caching.
marquis
Forum Newbie
Posts: 1
Joined: Sun Aug 19, 2007 1:02 pm

same problem

Post by marquis »

I get the same problem I'm at a total lost as to why this sometimes happens, I do have some more clues however.

If I load the the admin backend, I do not get this problem until I choose something from the menu, In other words, if the full URL of where I'm at does not end with ".php" The page loads normally.

This problem can be repeated with ANY browser on a linux system gui. (haven't tried command-line terminal browsers), but does not show up on IE in a windows box, or a MAC system.

It might have something to do with joomla or iframes or frames, rather then a file type problem on my linux machine, because I can not cause the problem to happen again on other sites where the URL ends with ".php" it's almost as if some kind of meta data has been inserted to cause non-windows browsers to view the file differently (like the old gif insert header hackers use)

Yes it is an apache based box, and no cashe does it's effect it, I've deleted the case files on both the server and the browser box. Note however that the problem does go away after a period of time, then shows up again, like a cashe problem, ISP/Traceroute cashe?!?

Like I said tollaly lost, this doesn't make the problem easier to solve.
Post Reply