slipmatt2002 Posted September 13, 2006 Share Posted September 13, 2006 I wonder if anyone can help. I have just designed a website for a client www.dunmar.co.uk. It all works fine in explorer and safari but when I open it in firefox and enter onto the first .php page (www.dunmar.co.uk/index2.php) i keep getting a popup window appear saying:you have chosen to open index2.phpWhat should firefox do with this file?• open with PHP document• save to diskand I cant get any further on the website. I am not sure if this is a problem with my PHP but would appreciate any advice. Sorry if this is something really obvious but I am quite new to this.Thanksslipmatt2002@yahoo.com Quote Link to comment https://forums.phpfreaks.com/topic/20612-php-firefox-issue/ Share on other sites More sharing options...
Jenk Posted September 13, 2006 Share Posted September 13, 2006 This means the webserver is not configured correctly :)Which webserver are you using? (Typically Apache, or IIS) Quote Link to comment https://forums.phpfreaks.com/topic/20612-php-firefox-issue/#findComment-91002 Share on other sites More sharing options...
black.horizons Posted September 13, 2006 Share Posted September 13, 2006 is PHP installed on your webserver?!?! Quote Link to comment https://forums.phpfreaks.com/topic/20612-php-firefox-issue/#findComment-91004 Share on other sites More sharing options...
slipmatt2002 Posted September 13, 2006 Author Share Posted September 13, 2006 I am not 100% sure if PHP is configured on my web server, i know i can view other php pages through firefox like my own site i have done http://www.mis-understood.co.uk/main.php. It is just this recent sote I am having issues with? Quote Link to comment https://forums.phpfreaks.com/topic/20612-php-firefox-issue/#findComment-91009 Share on other sites More sharing options...
btherl Posted September 13, 2006 Share Posted September 13, 2006 The headers the web server is returning look like this:[code]HTTP/1.x 200 OKServer: Microsoft-IIS/5.0X-Powered-By: ASP.NETDate: Wed, 13 Sep 2006 13:34:46 GMTContent-Type: application/octet-streamAccept-Ranges: bytesLast-Modified: Wed, 13 Sep 2006 11:08:59 GMTEtag: "c0a3f8225d7c61:de8"Content-Length: 3988Connection: Keep-Alive[/code]The problem here is Content-Type: application/octet-stream. It's a server configuration error that this conent-type is being returned. Unfortunately I can't help you with fixing it, as I'm not familiar with IISMaybe you can fix it by sending header("Content-type: text/html") from your php script. Quote Link to comment https://forums.phpfreaks.com/topic/20612-php-firefox-issue/#findComment-91020 Share on other sites More sharing options...
slipmatt2002 Posted September 13, 2006 Author Share Posted September 13, 2006 Thanks for that, I have checked my PHP and in the head tags it has<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">Not sure if that is what you mean but it is still not working.It is confusing me because I have set up several sites the same and it just seems to be this one that is causing me trouble, it is hosted by a different company, do you think this could be something to do with it?? Quote Link to comment https://forums.phpfreaks.com/topic/20612-php-firefox-issue/#findComment-91033 Share on other sites More sharing options...
HuggieBear Posted September 13, 2006 Share Posted September 13, 2006 I would imagine that PHP just isn't installed.Rich Quote Link to comment https://forums.phpfreaks.com/topic/20612-php-firefox-issue/#findComment-91035 Share on other sites More sharing options...
btherl Posted September 13, 2006 Share Posted September 13, 2006 Huggie, I doubt it would work in explorer and safari if php wasn't installed :) Quote Link to comment https://forums.phpfreaks.com/topic/20612-php-firefox-issue/#findComment-91042 Share on other sites More sharing options...
HuggieBear Posted September 13, 2006 Share Posted September 13, 2006 lol... I read that and then completely disregarded it... My bad and apologies :-[A side note, you might want to close the <!DOCTYPE tag at the tom of the HTML.Regards(A very embarrassed) HuggieBear Quote Link to comment https://forums.phpfreaks.com/topic/20612-php-firefox-issue/#findComment-91054 Share on other sites More sharing options...
btherl Posted September 14, 2006 Share Posted September 14, 2006 Actually what I meant was this, right at the top of your php file (before ANY html at all, even blank spaces.. otherwise you can't modify the headers)[code]<?php header("Content-type: text/html") ?>[/code]If that's not the very first line in your file, it won't work. You can have some php code before it, but no html.What that will do is it will modify the headers returned by the server. This is different from the "meta" http-equiv tags, which tell the browser "Pretend you saw this header instead of the one you really saw" :)It's possible that firefox is treating the real header (which says your script is an octet stream) as more trustworthy than the meta http-equiv (which says your script is html), but explorer and safari are trusting the http-equiv. If you can make the real header say "text/html" too, then that might fix it. Of course IIS might ignore your header() instruction.. but it's worth trying.Good luck :)PS What the browser returns after an HTTP request is actually a series of headers (as in my earlier post), followed by the HTML. Normally you never see those headers, because the browser reads them and interprets them but never displays them. Quote Link to comment https://forums.phpfreaks.com/topic/20612-php-firefox-issue/#findComment-91476 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.