SitePoint Sponsor

User Tag List

Page 1 of 4 1234 LastLast
Results 1 to 25 of 89
  1. #1
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE is Dumb can't parse PHP files

    How come IE can't parse PHP files that are parsed from HTACCESS to HTML. Without the page breaking ?

  2. #2
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can't help with the problem, but yes, IE is dumb for a lot of reasons.

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,608
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    Quote Originally Posted by SiberianHuskey View Post
    How come IE can't parse PHP files that are parsed from HTACCESS to HTML. Without the page breaking ?
    Browsers don't parse PHP. It's done on the server. Browsers just see the rendered HTML.

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,607
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    You need to either upload the files containing the PHP to a server that supports PHP before you can use them or if you want to be able to test on your own computer you need to install a web server and PHP onto your computer so as to be able to run it there.

    The easiest way to install a web server and PHP onto a windows computer is using either WAMP or XAMPP both of which install a complete package of web server languages and tools.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm testing on the Net. All other browsers, render fine. IE destroys the page, it's originally a PHP page but it's parsed. This is ridicules damn IE.

  6. #6
    Barefoot on the Moon! silver trophy
    Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,524
    Mentioned
    52 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by SiberianHuskey View Post
    I'm testing on the Net. All other browsers, render fine. IE destroys the page, it's originally a PHP page but it's parsed. This is ridicules damn IE.
    Is it spitting out code on the page, or is it just issues with IE and HTML/CSS?

    Do you have a link?
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  7. #7
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    (link)

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,607
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    That looks more like a problem with the CSS where you are using hacks that several versions of IE recognise but which are only needed for one version of IE.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  9. #9
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I need a condition for IE 7 +, owww.

  10. #10
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,608
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    Quote Originally Posted by SiberianHuskey View Post
    I need a condition for IE 7 +, owww.
    Code:
    <!--[if gte IE 7]><link rel="stylesheet" type="text/css" href="/css/ie.css"><![endif]-->
    CCs only work up to IE8, though.

  11. #11
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What about after IE 8 ?
    Is there a list of conditions that I can check to analyze for IE7. I should probably remove the hacks I have in place.

  12. #12
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,608
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    Quote Originally Posted by SiberianHuskey View Post
    What about after IE 8 ?
    IE9 doesn't have CCs, because they aren't needed. It's like other modern browsers. So good design shouldn't experience problems beyond 7 or 8.

    Is there a list of conditions that I can check to analyze for IE7.
    Not sure exactly what you mean, but this syntax will only be read by IE7:

    Code:
    * + html .whatever {
      styles here
    }

  13. #13
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If that Syntax would only be read by IE7 and IE8,9 etc don't need anything then why is it breaking when I did have the *hack applied ?

  14. #14
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,608
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    There's plenty of other reasons why the page might be breaking. It doesn't look like PHP is being parsed on that page anyway, as it has a .htm extension. Normally, you'll need a .php extension, unless you've set up something via htaccess. But the PHP appear in the source code, so if you have, it's not working.

    EDIT: O, maybe the htaccess is OK, but this at the top of your page isn't being parsed:

    Code:
    <?
    session_start(); //This should always be near the top
    $logging = true;
    ?>
    Try

    Code:
    <?php
    session_start(); //This should always be near the top
    $logging = true;
    ?>
    IE may not like that extra code above the doctype. Looks like your server is not supporting the shortand tag.

  15. #15
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Didn't work

  16. #16
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,608
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    Did you do it? Code is the same.

    What's in your htaccess file?

    EDIT: O, it has changed (maybe I needed to refresh), but the cosing tag has gone now.

    Code:
    <?php
    session_start(); //This should always be near the top
    $logging = true;
    ?>
    Details, details ...

  17. #17
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Updated. Same negative results.

  18. #18
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,608
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    OK, so the contents of the htaccess file? PHP isn't being parsed in your .htm page.

  19. #19
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How can't it be ? It is working for all the other browsers.


    # RewriteEngine on

    # RewriteRule ^(.*)\.htm$ $1.php [nc]

    AddType application/x-httpd-php .php .html
    The line in bold recently added

  20. #20
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,608
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    Quote Originally Posted by SiberianHuskey View Post
    How can't it be ? It is working for all the other browsers.
    No it isn't. I'm viewing this in Firefox. It just doesn't choke on the unparsed PHP above the doctype.

    AddType application/x-httpd-php .php .html
    That doesn't work for you, because your page is .htm, not .html. So use this instead:

    Code:
    AddType application/x-httpd-php .php .htm .html

  21. #21
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is fixed, the IE problem still is there.

  22. #22
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,608
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    The PHP still isn't being parsed (view source in any browser. You shouldn't be able to see the PHP code at the top of the page. Some browsers will choke if there's anything above the doctype.) Are you sure your server handles htaccess files? Is it running Apache?

  23. #23
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My server can handle htaccess files. As for running Apache, not sure. I'll update.

  24. #24
    SitePoint Guru
    Join Date
    Aug 2009
    Posts
    669
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure php uses the starting <?php and not just <? - some php.ini files have short tags disabled. (XML also uses <? so there is a legitimate reason for turning it off)
    I'll do anything to avoid working on my own code

    Are you using: if (isset($_POST['submit'])) ?
    IE has a bug and does not always send the value.

  25. #25
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,692
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    To pinpoint the error, try changing the extension to .php. This will tell you whether it's your PHP installation or your .htaccess file that's the culprit.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!


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
  •