Forum Moderators: phranque
I've tried the installation on two PC's both running XP Pro, with Windows firewall turned off and ZoneAlarm active.
One machine has IE6, the other IE7, both have FF2.0.0.3. PHP pages work fine in IE but show the source when viewed in FF (websites on the net render correctly).
I've tried disabling ZoneAlarm but this doesn't help.
I'm not sure where the problem is, is it FF, the OS or firewall?
Has anyone had a similar problem, or any suggestions how to diagnose where it is?
Steve
Most of the PHP setup example code on the Web confuses the Apache AddHeader and AddType directives. This is because an odd work-around was used when PHP was introduced, and its effects continue to this day.
[added] After seeing your second post, you might also have a content-encoding problem. Since I haven't had any PHP configuration problems myself, I will defer to the experts over in the WebmasterWorld PHP forum [webmasterworld.com]. Also, check out the PHP forum Library for several "How to install PHP" tutorials. [/added]
Jim
I now think the problem is within Apache.
I created a simple html page, "testing.html":
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Testing</title>
</head>
<body>
<h1>My test page</h1>
<p>Testing 1 2 3</p>
</body>
</html> Which works fine in IE, but displays in FF as:
Server: Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1 Last-Modified: Sat, 31 Mar 2007 14:55:02 GMT ETag: "1dd7320-113-2c359d80" Accept-Ranges: bytes Keep-Alive: timeout=5, max=100 Content-Type: text/html Transfer-encoding: chunked 69 fb
My test pageTesting 1 2 3
e 0
The live headers plug-in shows:
http://127.0.0.2:8080/testing.htmGET /testing.htm HTTP/1.1
Host: 127.0.0.2:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
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-gb,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
If-Modified-Since: Sat, 31 Mar 2007 14:55:02 GMT
If-None-Match: "1dd7320-113-2c359d80"
Cache-Control: max-age=0
HTTP/1.x 304 Not Modified
Date: Sat, 31 Mar 2007 14:58:34 GMT
Server: Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
Etag: "1dd7320-113-2c359d80"
----------------------------------------------------------
http://127.0.0.1:1027/js.cgi?a&r=900
GET /js.cgi?a&r=900 HTTP/1.1
Host: 127.0.0.1:1027
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Accept: */*
Accept-Language: en-gb,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: http://127.0.0.2:8080/testing.htm
Cache-Control: max-age=0
HTTP/1.x 200 OK
Connection: close
Content-Type: application/x-javascript
----------------------------------------------------------
The javascipt is inserted by ZoneAlarm.
I don't fully understand headers, is there a problem with these?
Steve
The headers are as follows:
http://127.0.0.2:8080/favicon.icoGET /favicon.ico HTTP/1.1
Host: 127.0.0.2:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Accept: image/png,*/*;q=0.5
Accept-Language: en-gb,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
HTTP/1.x 200 OK
Date: Sat, 31 Mar 2007 19:53:44 GMT
Server: Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1
Last-Modified: Tue, 08 Nov 2005 13:17:02 GMT
Etag: "1dd71e0-547e-96596f80"
Accept-Ranges: bytes
Keep-Alive: timeout=5, max=100
Content-Type: image/x-icon
Transfer-Encoding: chunked
----------------------------------------------------------
http://127.0.0.2:8080/testing.htm
GET /testing.htm HTTP/1.1
Host: 127.0.0.2:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
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-gb,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
Cache-Control: max-age=0
HTTP/1.x 200 OK
----------------------------------------------------------
http://127.0.0.1:1027/js.cgi?a&r=18538
GET /js.cgi?a&r=18538 HTTP/1.1
Host: 127.0.0.1:1027
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Accept: */*
Accept-Language: en-gb,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: http://127.0.0.2:8080/testing.htm
HTTP/1.x 200 OK
Connection: close
Content-Type: application/x-javascript
----------------------------------------------------------