/    Sign up×
Community /Pin to ProfileBookmark

Raw PHP Code being displayed in firefox 1.5 but not IE

Hi All,

I’ve got a strange problem going on and I haven’t been able to find anything on the net about this except one post in this forum in 2005.

What’s happening is that I have a PHP file that suddenly is displaying the RAW CODE in Firefox 1.5. From what I’ve seen it seems that the browser doesn’t have anything to do with whether or not PHP is parsed but this same file displayes correctly in IE.

The file itself hasn’t changed. I did upgrade firefox to 1.5 a week ago but I can’t say for sure whether that was the change that created this issue or whether something on the server changed since I don’t control the server.

I even created an empty PHP file, uploaded it to the server, and Firefox 1.5 displayes the code when I open the page…

foo.php
[INDENT][COLOR=SlateGray]<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
<html xmlns=”http://www.w3.org/1999/xhtml“>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
<title>Untitled Document</title>
</head>

<body>
</body>
</html>[/COLOR]
[/INDENT]

My question is, has anyone seen anything like this before? Does anyone have any suggestions as to what could cause this problem? Or can anyone just offer any information about PHP parsing issues in general with regard to why one browser would display raw code and another display the exact same file correctly?

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@DariaSep 25.2006 — can you post the code?
Copy linkTweet thisAlerts:
@techyogiauthorSep 25.2006 — The following code will properly display TEST TEST TEST in IE

and in Firefox 1.5 it will display the raw code...


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Untitled Document</title>

</head>

<body>

TEST TEST TEST

</body>

</html>
Copy linkTweet thisAlerts:
@NogDogSep 25.2006 — Sounds like maybe your web server is not configured properly or does not even have PHP installed, and it's just sending the .php file without a "text/html" content type in the HTTP headers. One browser is assuming that the unidentified type should be treated as HTML, whereas the other is making no such assumption and treating it as a plain text file.
Copy linkTweet thisAlerts:
@techyogiauthorSep 25.2006 — Sounds like maybe your web server is not configured properly or does not even have PHP installed, and it's just sending the .php file without a "text/html" content type in the HTTP headers. One browser is assuming that the unidentified type should be treated as HTML, whereas the other is making no such assumption and treating it as a plain text file.[/QUOTE]


Looks like you are right. Thanks a bunch.
×

Success!

Help @techyogi spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...