SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    PHP pages not displaying by default.

    PHP pages not displaying in some versions of IE.

    I have had a report from some people that when someone first visits one of the PHP pages on my site, instead of showing the page in the browser, a dialog box comes up asking whether you want to open or save the file. If you choose open, the page is opened and viewed from the hard drive.

    It sounds like a mime type error, but I have checked my headers and the Content-type is text/html

    Can anyone confirm this? If you want to test it, it was happening at this page, as well as my front page.

    ----
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  2. #2
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    works for me just fine.
    viewed the page normally.
    maybe it's a client-side problem, not server side.
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  3. #3
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I've had the problem from two different people on different ISP's.

    PS there's no need to let me know that it works fine. I know that it works fine for most people At this stage I'm only looking for people who have the problem. Thanks.
    Last edited by mmj; Sep 7, 2001 at 01:06.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  4. #4
    SitePoint Enthusiast kcabobert's Avatar
    Join Date
    Aug 2001
    Location
    Topeka, KS
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My question is: Can the people who can download it see the PHP code? Like was it ever parsed or did it just get dumped?
    Microsoft's Motto: Resistance is futile, you will be assimilated.

    My dog's name is Jade; she is a Miniature pinscher.
    Click here to see some of her pictures

  5. #5
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It was parsed correctly. It downloaded as an html file, which could be loaded and viewed. This is what I don't understand. If it is of type text/html, it should display in the browser rather than download.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  6. #6
    SitePoint Enthusiast kcabobert's Avatar
    Join Date
    Aug 2001
    Location
    Topeka, KS
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you know what browsers the people who encounterd errors were using?
    Microsoft's Motto: Resistance is futile, you will be assimilated.

    My dog's name is Jade; she is a Miniature pinscher.
    Click here to see some of her pictures

  7. #7
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe it is a problem with their file type settings. You can really mess around with windows and stuff some stuff up. I once was able to make it that all shtml and html pages gave the save dialog box, and ended up having to format to fix the stupid problem. I'd say they've got an old version of windows / browser, or they've messed around with some settings.

    -Peter

  8. #8
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I think it was only occurring on IE 4 or 5. It wasn't 5.5

    It happened to at least two different people at two different locations, and this is why I see it as a problem. For both people, pressing 'cancel' and reloading the page caused it to be displayed properly the second time. Also, neither person has this problem with any other sites.
    Last edited by mmj; Sep 8, 2001 at 01:18.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  9. #9
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I hope you did two things.

    1) Respond by saying that the probelm MUST be at their end becaus it the site works just fine FOR EVERYONE ELSE and that they should definitely reformat their hard disk and reinstall windows and that it sounds like they have a VIRUS and they had better take the computer back to where they bougth it from.

    2) Suggest that the problem is caused by some sort conflict with the SPYWARE that Microsoft have built into the browser - and they had better watch out if they have ANY non-licenced software on their system.

    On a serious note however, I just installed some software on a server which had the following to say in the install instructions:
    Tweak the web server for MSIE

    The MSIE browser has a number of bugs in its HTTP/1.1 implementation,
    at least as of MSIE 4.x and 5.x. You must configure your web server to
    use HTTP/1.0 when talking to any MSIE browser (at least until MSIE
    gets fixed). The problem has to do with downloading attachments.
    Apparently, MSIE forgets how MIME works, when it uses HTTP/1.1. For
    the Apache server, insert the following directive in httpd.conf:
    BrowserMatch "MSIE" nokeepalive downgrade-1.0 force-response-1.0

    Recent versions of Apache already have a similar directive for a
    specific version of MSIE, MSIE 4.0b2. Just replace it with a
    browsermatch for any MSIE version.
    So it sounds like something worth researching more. I would, except I think it is easier to just default to 1) or 2) above.

    Actually, I just looed at the headers from going to the link you gave - and I got served a header which said the content was HTTP/1.0. However, I also notice that your server is configured with mod_gzip 1.3.19.1a It would be interesting to know if that is causing the funnyness

  10. #10
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply freakysid.

    I've contacted the people involved and I've certainly tried to find out more info

    Although I haven't been able to replicate the problem, I have seen the problem in action (over somebody else's shoulder).

    I'll try and get some more information.

    I am wondering if it is a problem with having the Content-type as the last line in the header. I notice that sitepointforums.com/ has extra padding below the Content-type: line, so that the Content-type line is not at the end.

    I don't know how this would help.

    I don't think the mod_gzip apache module affects PHP output, and I don't have the zlib PHP module. Therefore, the output from PHP has no content-encoding. It's plain text/html

    The problem has not appeared in IE5.5

    Once I know more from the people having problems, I'll speak to my friendly hosts.

    PS.
    By the way freakysid, I would be interested in knowing what tool you use to read the http response header. The tool I use returns an HTTP 1.1 header.
    Last edited by mmj; Sep 8, 2001 at 07:51.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  11. #11
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Was the whole page being downloaded? Perl sometimes sends errors to the browser to download rather than displaying them on screen, I've never seen this happen with PHP, but you never know...

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  12. #12
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yes, it was the whole page.

    It's a mystery
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  13. #13
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by mmj


    I don't think the mod_gzip apache module affects PHP output, and I don't have the zlib PHP module. Therefore, the output from PHP has no content-encoding. It's plain text/html
    Oh - I have not installed mod_gzip and I had never really though of that - that it would not compress non-static files but it makes sense that it wouldn't. But I will have to read more about that.

    By the way freakysid, I would be interested in knowing what tool you use to read the http response header. The tool I use returns an HTTP 1.1 header.
    I knew you were going to ask that - I didn't give details because I didn't actually post the previous post from my mac -even though I loaded your page in mac because I have Interarchy installed on my PowerMac which is what I use to look at data transport. So it is interesting that I was served HTTP 1.0 for IE5 for Mac.

    By the way - I have had this sort of thing happen even in IE5.5 which I have installed on a old P1 MMX166 which is running win95. In fact - the browser is behaving quite odd lately (not that I use it much) because I often get returned that silly IE page can't be displayed message the first time I request a page, but get the page on the second go. Also sometimes I get the problem you have described too! (though not on your site I didn't). I reckon there is something a bit screwy somewhere else in the system as pete suggested.

    Anyway here are those headers.
    Code:
    Send data (329 bytes) on stream 21.
    <00000000< GET http://www.mostlyamphigory.com/optin.php HTTP/1.0  
    <00000037< Host: www.mostlyamphigory.com  
    <00000056< Accept: */*  
    <00000063< Accept-Language: en  
    <00000078< Proxy-Connection: Keep-Alive  
    <00000096< If-Modified-Since: Sat, 08 Sep 2001 13:31:06 GMT  
    <000000C8< User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)  
    <00000105< UA-OS: MacOS  
    <00000113< UA-CPU: PPC  
    <00000120< Extension: Security/Remote-Passphrase  
    <00000147<   
    
    Receive data (376 bytes) on stream 21.
    >00000000> HTTP/1.0 200 OK  
    >00000011> Date: Sat, 08 Sep 2001 14:09:53 GMT  
    >00000036> Content-Type: text/html  
    >0000004F> Expires: Sat, 08 Sep 2001 20:09:53 GMT  
    >00000077> Cache-Control: no-cache, no-store, must-revalidate  
    >000000AB> Server: Apache/1.3.6 (Unix) mod_gzip/1.3.19.1a PHP/4.0.4pl1 
    >000000E7> mod_perl/1.21 mod_ssl/2.2.8 OpenSSL/0.9.2b  
    >00000113> X-Powered-By: PHP/4.0.4pl1  
    >0000012F> Via: 1.1 BPA_netcache_nsw1 (NetCache NetApp/5.1D5)  
    >00000163> Connection: Close  
    >00000176>   
    
    Receive data (2501 bytes) on stream 21.
    >00000178> <head>  
    >00000180> <meta http-equiv="Content-Type"  
    >000001A1> content="text/html; charset=iso-8859-1">  
    >000001CB> <meta name="description"  
    >000001E5> content="The Mostly Amphigory is a humorous magazine written 
    >00000222> by students.  Read our hilarious college humour and share 
    >0000025C> jokes in our forums.">  
    >00000274> <meta name="keywords"  
    >0000028B> content="humor,college humor,satire,humorous magazine,jokes,foru
    >000002CB> ms,humour,political,office,laugh,funny,discussion,laughter,club,
    >0000030B> extreme,movies,chat rooms,quotes,free,college,tv,people,Chat,amp
    >0000034B> higory,mostly,online,meet,satirical,comedy,hamilton,victoria,aus
    >0000038B> tralia,web,melbourne,aussie,articles,fun,magazine">  
    >000003C0> <meta name="GENERATOR" content="Microsoft FrontPage Express 
    >000003FC> 2.0">  
    >00000403> <title>Subscribe to the FREE MostlyAmphigory email newsletter!</
    >00000443> title>  
    >0000044B> <link rel="stylesheet" type="text/css" href="/navbar/vn1style.cs
    >0000048B> s">  
    >00000490> </head>  
    >00000499> <body>  
    >000004A1>   
    >000004A3> <div align="center"><center> 
    >000004C0>  
    
    etc ...
    BTW - I am sure this is nothing to do with your problem but I find this tag a little odd (I admit that I am no HTML guru - in fact I'm pretty pathetic in my knowledge of modern HTML) but this is odd (from your home page)...

    <html dir="ltr">
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=iso-8859-1">

    I would have though that specifiying the char set made the dir="ltr" redundant. Anyway - I just found that interesting - not trying to make anything of it.

  14. #14
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freakysid



    By the way - I have had this sort of thing happen even in IE5.5 which I have installed on a old P1 MMX166 which is running win95. In fact - the browser is behaving quite odd lately (not that I use it much) because I often get returned that silly IE page can't be displayed message the first time I request a page, but get the page on the second go. Also sometimes I get the problem you have described too! (though not on your site I didn't). I reckon there is something a bit screwy somewhere else in the system as pete suggested.
    Thanks. That is very interesting, since the system that I saw it happen on was a very old pentium with win95.

    As for the dir=ltr attribute on the html tag, that is there because the page was originally an .html page created by frontpage express. Before I started doing my own code (and before I found SitePoint), I used frontpage express. On some of my pages, I still haven't edited the html tag It's a little embarassing.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff


Bookmarks

Posting Permissions

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