Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2001
    Posts
    929

    Parsing .asp as .php files

    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

  2. #2
    Join Date
    Jan 2002
    Location
    Kuwait
    Posts
    679
    Try adding this to httpd.conf or .htaccess:

    Code:
    AddType text/html .asp
    Ahmad Alhashemi
    PHP, Apache, C, Python, Perl, SQL
    18 related BrainBench certificates

  3. #3
    Join Date
    Jun 2001
    Posts
    929
    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)?

  4. #4
    Join Date
    Jan 2002
    Location
    Kuwait
    Posts
    679
    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.
    Ahmad Alhashemi
    PHP, Apache, C, Python, Perl, SQL
    18 related BrainBench certificates

  5. #5
    Join Date
    Jun 2001
    Posts
    929
    Hi Ahmad thanks for the help.

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

  6. #6
    Join Date
    Jun 2001
    Posts
    929
    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?

  7. #7
    Join Date
    Jan 2002
    Location
    Kuwait
    Posts
    679
    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:

    Code:
    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.
    Ahmad Alhashemi
    PHP, Apache, C, Python, Perl, SQL
    18 related BrainBench certificates

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •