SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot miner2049er's Avatar
    Join Date
    Apr 2004
    Location
    Somewhere Out There
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Localhost PHP not working after upgrade to IE7

    On my PC (Windows XP Home, version 2002, SP2), I'm running PHP 4.3.8 and MySQL 4.0.20a-nt.

    Viewing pages locally through localhost, everything worked fine with Internet Explorer 6, but after upgrading to IE7, the parts of served pages are empty where there should have been PHP created content.

    On the same PC, Firefox 1.5.0.8 can still serve up localhost pages with no problem.

    Where might I start looking to fix the problem so that my localhost works with IE7? I suspect it may be a security settings issue, but I may be wrong.

    Thanks in advance for any assistance,

    Miner2049er.

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what do you mean parts?
    is some of the script working?

    you should right click > view source and look at your html.

    now, look at the source code of the php script which generated this, and you can start figuring out what could have went wrong in your script to cause the html you see.

  3. #3
    SitePoint Zealot miner2049er's Avatar
    Join Date
    Apr 2004
    Location
    Somewhere Out There
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply.

    To clarify things, anything in my original .PHP file between the <? and ?> tags did not get interpreted by the PHP interpreter, and nothing was delivered as HTML - just everything outside those tags was.

  4. #4
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I have a fix

    I had the same problem after I upgraded to IE7.

    It seems that IE6 was happy with <? phpinfo() ; ?>
    but IE7 requires <?php phpinfo(); ?>

    Hope this helps.

    It may be that IE7 has a stricter interpretation of what a script is.

  5. #5
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    neil, i think you dont understand the difference between a serverside language and a clientside language.
    php is a serverside language, meaning it is run on the webserver.

    browsers do not know what php code is, and they dont need to, because they never see it. php code is interpreted on your webserver, not in the browser. the output generated by the php code is sent to the browser.

    if <? didnt work but <?php did, this was not related to the browser. this was because YOU changed your php configuration and turned off short_open_tag. maybe you upgraded php and thats when the setting got changed, but the point is that it would act the same in any browser.

    you should always be using full <?php tags anyway if you want your code to be portable.

  6. #6
    SitePoint Evangelist superuser2's Avatar
    Join Date
    Aug 2006
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by clamcrusher
    neil, i think you dont understand the difference between a serverside language and a clientside language.
    php is a serverside language, meaning it is run on the webserver.

    browsers do not know what php code is, and they dont need to, because they never see it. php code is interpreted on your webserver, not in the browser. the output generated by the php code is sent to the browser.

    if <? didnt work but <?php did, this was not related to the browser. this was because YOU changed your php configuration and turned off short_open_tag. maybe you upgraded php and thats when the setting got changed, but the point is that it would act the same in any browser.

    you should always be using full <?php tags anyway if you want your code to be portable.
    <?php is not interpreted by the browser. If it was, PHP would be incredibly insecure. If your PHP interpreter is working correctly, no PHP code should EVER be sent IN ANY EVENT to the browser. Never. IE6 vs. IE7 has nothing to do with it. It's a question of a server-side setting. Apache doesn't send PHP code to the browser, it executes the PHP code and sends the HTML it generates to the browser.

    Clamcrusher is right. This has nothing to do with your IE version. Something changed with PHP. Check you php.ini file and make sure the short tags directive is still enabled. But I would recommend using full tags because shorthand isn't portable, most servers don't support it.


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
  •