SitePoint Sponsor

User Tag List

Results 1 to 16 of 16
  1. #1
    SitePoint Addict
    Join Date
    Oct 2005
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple PHP site not working in IE9

    Hi everyone,

    A few years ago I made a very simple PHP website - easterncreekkarts.com.au

    It has a simple MySQL database and uses PHP includes for reusable parts like the header and footer.

    The website has hardly been updated since launch in 2007. But I started getting complaints from the client that none of the pages were working. I couldnt reproduce the problem until I just upgraded to IE9.

    When you first open the website in IE9 the homepage loads fine, but clicking onto any other page (e.g. About) all fo the content is missing. Header, menu & footer still load, but the content which should appear between the menu and the footer is blank.

    However, veiwing the source reveals the content is all there, and switching to 'compatibility view' fixes the issue.

    I can't figure it out, hoping someone else has encountered the issue and might be able to suggest a fix. It works in every browser except IE9.

    Thanks

  2. #2
    ¬.¬ shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Its probably invalid HTML.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Addict
    Join Date
    Oct 2005
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's what I originally thought, but i just ran several of the pages through the W3C validator and they all passed.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,301
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by mitcho View Post
    That's what I originally thought, but i just ran several of the pages through the W3C validator and they all passed.
    That's interesting: I tried the same thing and it threw a big error, saying there was an encoding problem with the pages that prevented it from validating the pages at all.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jan 2011
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think your site got HTML, JS or CSS problem, not PHP because PHP is the server side scripts.

  6. #6
    SitePoint Addict
    Join Date
    Oct 2005
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    That's interesting: I tried the same thing and it threw a big error, saying there was an encoding problem with the pages that prevented it from validating the pages at all.
    There was a strange character in there which i removed (pasted from MS Word) but once removed everything validated perfectly but the problem still remains.

  7. #7
    SitePoint Addict
    Join Date
    Oct 2005
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by thietkeweb View Post
    I think your site got HTML, JS or CSS problem, not PHP because PHP is the server side scripts.
    Thanks, i have posted it in the wrong section - moderator is going to move it to the html/css section.

  8. #8
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,068
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    When trying the validation on one of the pages i got:

    1. Mismatch between Public and System identifiers in the DOCTYPE declaration
      This document uses an inconsistent DOCTYPE declaration. The Public Identifier -//W3C//DTD XHTML 1.0 Transitional//EN declares the XHTML 1.0 Transitional document type, but the associated System Identifier http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd does not match this document type.
      The recommended System Identifier for XHTML 1.0 Transitional is http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd.
      The safest way to use a correct DOCTYPE declaration is to copy and paste one from the recommended list and avoid editing that part of your markup by hand.
    The page displays ok for be (FF 3.6.17) maybe IE9 is less forgiving. Is IE9 displaying it in "quirks mode"?
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  9. #9
    SitePoint Addict
    Join Date
    Oct 2005
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    When trying the validation on one of the pages i got:

    The page displays ok for be (FF 3.6.17) maybe IE9 is less forgiving. Is IE9 displaying it in "quirks mode"?
    Yes i saw that, it was only a warning. I've fixed it now for the 'about' page only but it didn't solve the problem with IE9 not displaying. According the W3C the about page is 100% valid

  10. #10
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,301
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    OK, thread moved to the HTML forum. Looks like it might be worth replacing the doctype, even if that's not the problem.

  11. #11
    SitePoint Enthusiast
    Join Date
    Jan 2011
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the problem is in your css file screen.css:

    Code:
    #content {
        font-size: 12px;
        margin: 0 auto;
        overflow: hidden;
        padding-top: 5px;
    }
    Please try to remove the overflow: hidden; and let me know how the result.

  12. #12
    ¬.¬ shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Overflow hidden without a height...
    bit.ly/ih9fcy Sorry about the size of the image...
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  13. #13
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool

    Mitcho, in your screen.css you have a body {line-height:130%;} statement. If I change the line-height to anything less than 130% (even 129%) then it works okay in IE9. Try changing that value and see if it helps you.
    Don't ask me why????

  14. #14
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,301
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by alphabyte View Post
    Mitcho, in your screen.css you have a body {line-height:130%;} statement. If I change the line-height to anything less than 130% (even 129%) then it works okay in IE9. Try changing that value and see if it helps you.
    Don't ask me why????
    Well spotted! That does work, but it sure is weird.

  15. #15
    SitePoint Addict
    Join Date
    Oct 2005
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Big big thank you to thietkeweb and logic_earth - removing the overflow:hidden fixed it!!

  16. #16
    SitePoint Enthusiast
    Join Date
    Jan 2011
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're welcome mitcho, i'm please to share what I know.


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
  •