Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Instead of viewing browser tried to download .html
Old 10-21-2010, 09:51 AM Instead of viewing browser tried to download .html
EdB
Skilled Talker

Posts: 79
Name: Ed Barnett
Trades: 0
Hi guys,

I've got WAMP set up on my laptop. I have a large number of websites working on my laptop using WAMP (in order to be able to parse PHP) but for some reason one website is acting strangely.

When I try to view the .html pages every single browser offers the open/save dialogue box. This only happens on some of the pages but I can't figure out why.

Has anyone else experienced this before?

Thanks in advance.

Ed
__________________

Please login or register to view this content. Registration is FREE
EdB is offline
Reply With Quote
View Public Profile Visit EdB's homepage!
 
 
Register now for full access!
Old 10-21-2010, 10:17 AM Re: Instead of viewing browser tried to download .html
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,390
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
The server is sending the wrong MIME Type (ContentType) to the browser.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-21-2010, 10:26 AM Re: Instead of viewing browser tried to download .html
EdB
Skilled Talker

Posts: 79
Name: Ed Barnett
Trades: 0
Quote:
Originally Posted by chrishirst View Post
The server is sending the wrong MIME Type (ContentType) to the browser.
Hi Chris,

Thanks for the reply. How do I go about viewing the MIME info sent by the server and most importantly amending it?

I've got a .htaccess file with the following line;

AddHandler application/x-httpd-php5 .html .htm

When i comment it out and restart apache most of the pages start to work but some suffer the same problem as above.

Best wishes,

Ed
__________________

Please login or register to view this content. Registration is FREE
EdB is offline
Reply With Quote
View Public Profile Visit EdB's homepage!
 
Old 10-21-2010, 10:39 AM Re: Instead of viewing browser tried to download .html
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,390
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
In that case it would appear that the php5 daemon/service isn't running on your machine.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-21-2010, 10:54 AM Re: Instead of viewing browser tried to download .html
EdB
Skilled Talker

Posts: 79
Name: Ed Barnett
Trades: 0
Quote:
Originally Posted by chrishirst View Post
In that case it would appear that the php5 daemon/service isn't running on your machine.
Hi Chris,

I don't know how that makes sense though as the issue is intermittent and arises on different pages (on the same site). I.e. some pages work fine and others don't. When I reset apache the pages that it effects will change.

Any thoughts?
__________________

Please login or register to view this content. Registration is FREE
EdB is offline
Reply With Quote
View Public Profile Visit EdB's homepage!
 
Old 10-21-2010, 02:58 PM Re: Instead of viewing browser tried to download .html
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,390
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
do pages with .php extensions work ok?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-22-2010, 05:58 AM Re: Instead of viewing browser tried to download .html
EdB
Skilled Talker

Posts: 79
Name: Ed Barnett
Trades: 0
Quote:
Originally Posted by chrishirst View Post
do pages with .php extensions work ok?
Yeah they work ok. The .html files work too but for some reason only a few of them are being offered to download. When I restart apache the files that it affects will change (but the problem will still be prevelant).

Hmm? This is quite confusing.
__________________

Please login or register to view this content. Registration is FREE
EdB is offline
Reply With Quote
View Public Profile Visit EdB's homepage!
 
Old 10-23-2010, 05:10 PM Re: Instead of viewing browser tried to download .html
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,390
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Use webbug to see what headers are being sent with the pages.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-23-2010, 06:32 PM Re: Instead of viewing browser tried to download .html
Skilled Talker

Posts: 52
Trades: 0
Quote:
Originally Posted by EdB View Post
Yeah they work ok. The .html files work too but for some reason only a few of them are being offered to download. When I restart apache the files that it affects will change (but the problem will still be prevelant).

Hmm? This is quite confusing.
This may happen when in your .html you have some php code or tags <? .. ?>


You should also validate your html page on w3schools and try also to add this meta tag
HTML Code:
<META HTTP-EQUIV="Author" CONTENT="WebMasterTalker">
webmastertalker is offline
Reply With Quote
View Public Profile
 
Old 10-27-2010, 08:18 AM Re: Instead of viewing browser tried to download .html
EdB
Skilled Talker

Posts: 79
Name: Ed Barnett
Trades: 0
Quote:
Originally Posted by webmastertalker View Post
This may happen when in your .html you have some php code or tags <? .. ?>


You should also validate your html page on w3schools and try also to add this meta tag
HTML Code:
 
<META HTTP-EQUIV="Author" CONTENT="WebMasterTalker">
 
Hi, thanks for the feedback.

Just to complete the story, I have no idea why but changing the Author tags in all of the pages (as below) worked;

from --> <META HTTP-EQUIV="Author" CONTENT="Previous company name">
to --> <META HTTP-EQUIV="Author" CONTENT="Design Mate Ltd">

Thanks for the help, I'm glad that's sorted now even though I don't get it.
__________________

Please login or register to view this content. Registration is FREE
EdB is offline
Reply With Quote
View Public Profile Visit EdB's homepage!
 
Reply     « Reply to Instead of viewing browser tried to download .html
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30890 seconds with 12 queries