Web Hosting Talk







View Full Version : Parsing .asp as .php files


The Laughing Cow
06-16-2002, 06:57 AM
Ok, this one has really got me stumped.

A visitor to this site http://mdnhw.co.uk using Nutscrape has said that when he clicks a link all it displays is the pages HTML.

So if you see that URL and click one of the eyes in NS (and Mozilla I tried too) it shows just the HTML source. weird huh?

However if viewing in IE it all works fine. I will check through my code to check I had not put some screwy script (this site was made ages ago) in there.

Important to note - Running on Linux box, not sure if ASP is supported but it doesn't have any ASP in it (even though its .ASP because I took the ASP out and didn't have time to update all links so kept .ASP) I have setup an Apache handler to pass these through server-parsed, this way it will include the newspro stuff which is an include well thats what I think it does.

So what do you think on this? I am trying to workout if it's server or client side coding problem. Everyone seems to think it's server-side so far.

Anyone experienced a problem like this before? Also is there a way I can set all .asp files to parse as .php? Would this change affect everyone on the box? obviously we wouldnt want this.


Thanks for your help.



Well and truly confused

Ahmad
06-16-2002, 07:15 AM
Try adding this to httpd.conf or .htaccess:


AddType text/html .asp

The Laughing Cow
06-16-2002, 07:28 AM
Well looking at what is setup in the control panel, I actually figure that I have not configured any Handlers or anything else i was messing about with and the SSI in the .asp pages is working. In this case I don't really know what this issue can be - surely if it works ok in IE it should physically work in Mozilla (ok maybe not look 100% right at times but still)?

Ahmad
06-16-2002, 07:34 AM
How about manually checking the MIME type being sent by the server?

You can do this using telnet. I can give you information about how to do it, or you can give me the address to your page and I will do it myself now.

The Laughing Cow
06-16-2002, 07:38 AM
Hi Ahmad thanks for the help.

The page is http://mdnhw.co.uk

The Laughing Cow
06-18-2002, 07:21 AM
Ahmad did you manage to have a look?

Does anyone know what causes this problem that a page views at text when using Netscape but fine in IE?

Is it those Mime or Handler thingyz I see in Cpanel that can set this?

Ahmad
06-18-2002, 01:27 PM
Sorry for that. I got busy and just noticed the thread again.

I checked the page out. The header your server is sending contains this line:


Content-Type: text/html


I don't see any problem server side. It must be a bug in netscape.

Try makeing a copy of the page with an html or php extension and see how it is displayed in netscape.