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

johnclassick
—
2011-10-02T23:50:08Z —
#2

I can't help with the problem, but yes, IE is dumb for a lot of reasons.

ralphm
—
2011-10-02T23:55:50Z —
#3

SiberianHuskey said:

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.

felgall
—
2011-10-02T23:59:51Z —
#4

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 [URL="http://www.apachefriends.org/en/xampp-windows.html"]XAMPP](http://www.wampserver.com/en/download.php) both of which install a complete package of web server languages and tools.

system
—
2011-10-03T00:48:29Z —
#5

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.

force
—
2011-10-03T00:50:27Z —
#6

SiberianHuskey said:

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?

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.

ralphm
—
2011-10-03T03:33:35Z —
#12

SiberianHuskey said:

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:

<font color='"#FF0000"'>* + html</font> .whatever {
styles here
}

system
—
2011-10-03T03:36:34Z —
#13

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 ?

ralphm
—
2011-10-03T03:46:52Z —
#14

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:

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

Try

<?<font color='"#FF0000"'>php</font>
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.

system
—
2011-10-03T04:10:15Z —
#15

Didn't work

ralphm
—
2011-10-03T04:14:54Z —
#16

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.

<?php
session_start(); //This should always be near the top
$logging = true;
<font color='"#FF0000"'>?></font>

Details, details ...

system
—
2011-10-03T04:25:19Z —
#17

Updated. Same negative results.

ralphm
—
2011-10-03T04:38:38Z —
#18

OK, so the contents of the htaccess file? PHP isn't being parsed in your .htm page.

system
—
2011-10-03T05:07:04Z —
#19

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

ralphm
—
2011-10-03T05:17:37Z —
#20

SiberianHuskey said:

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: