DOCTYPE craziness with IE8

I use xhtml docs to store content for my site – it’s a custom built cms written in php.

So, my content files all use a template that looks like this:

<?xml version=”1.0″ encoding=”UTF-8″ ?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.manick.co.uk/TR/xhtml1/DTD/xhtml1-transitional.dtd“>

<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>

<head>
</head>

<body>
</body>

</html>

Anyway, I’ve noticed that IE8 fails to show these files, though FF has no issue. Very annoying. It would show an error like this:

The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


System error: -2146697204. Error processing resource ‘http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd’.

 

 

Anyway I finally decided to research the problem and find out what is wrong…

I found a very relevant blog post about DTDs here:

http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic

It seems that w3 suffer from excessive traffic when these DTD documents are repetitively called for over the Internet resulting in a kind of DOS attack.

There seems to be a great deal of ongoing debate regarding this issue – as I was looking for a quick fix I decided to host the relevant DTDs on my own server.

I was happy to do this as these XHTML files are not served directly to web browsers but are processed by PHP on my webserver.

The resulting document that is returned to the webrowser can continue to list the www.w3.org DTD document.

I’m guessing that IE8 shouldn’t be attempting to load these documents from w3.org when I try to view my xml files that contain the xhtml.

Also it appears that the w3.org have now gone so far as to block browsers requesting the DTD based on the User-Agent string of the HTTP request.

I gleaned this info from: http://www.outofcontrol.ca/2009/02/20/w3org-dtdxhtml1-strictdtd-blocks-windows-ie-users/

It seems odd to me that we are still struggling with this and it’s now nearly 2010.



PHPExcel

Decided to find out if there were any free libraries that would allow you to create Excel files from scratch. Idea being that you can call this from PHP and create a spreadsheet from a website. Not a new idea but anyway. Found PHPExcel v1.7.0 and got it installed and running very quickly. Great piece of work. I will likely use it at some point in some project or other. Oh, it writes Excel 2007 format too.



Lightbox 2

While looking at various image gallery solutions for web content I found a great script called Lightbox 2. Just google it and I’m sure you’ll find it. It produces a nice simple clean effect for showing a clickable thumbnail that expands into the full size image from within any page. Simple but sweet.



DVD Ripping Burning ISO Creation

While looking for software that performs DVD ripping, ISO creation, ISO burning etc it’s easy to get swamped in the hundreds of options available. However I tend to be wary of paying for such utilities generally as many seem to be mere wrappers around existing code or even open source code.
Anyway – I’d recommend a trip over to Doom9.net for a look around they have a great list of tools for use in this area.
I was making a duplicate of a data dvd and also wanted a ISO to backup to my external hdd.
I used DVD Decrypter to rip it to an ISO and then used Daemon Tools to mount the ISO and check it was ok, and finally DVD Decrypter again to burn it to another DVD. I could obviously just have moved the data files in explorer as this was just a data disc and have created a backup disc that way, but I prefer to have an ISO of an important disc.

As a footnote the developer of DVD Decrypter is Lightning UK and they/he had to stop work on it some time ago after receiving a cease and desist notice – however they/he now provide ImgBurn here: http://www.imgburn.com

Great work – thanks a lot to them.



Internet Explorer 8 crashing with Adobe Flash Player

I had a machine today where IE8 would consistently crash if it attempted to install the Adobe Flash Browser by visiting http://get.adobe.com/flashplayer/. As soon as the yellow bar appeared to ask the user if they wanted to install the component then Windows would pop up a crash dialogue complaining about some memory issue.

I spent a long time trying to resolve this before I found a solution.

I tried following Adobe’s instructions for uninstalling the player and attempted to re-install it. I tried disabling various IE Add-Ons from the Tools | Manage Add-ons menu. No joy – same problem every time. I even tried the Reset button on the Tools | Internet Options -> Advanced tab (careful as this can wipe important settings, make sure you know what this does). All to no avail.

I searched for a long time to find a downloadable up to date offline installer from Adobe and couldn’t find one.

Then I eventually found my solution….there is one – an offline installer that is and it’s available if you visit http://get.adobe.com/flashplayer/ and then click on ‘Different operating system or browser’ and follow the instructions.

It’s also available here.

As for why IE8 was crashing – I never got to the bottom of that. I did contact Microsoft but was told that they would not provide support for IE8 if the machine is connected to a domain. Not sure if that is the official line or not.



Process Affinity

I just experienced something new – multi threading on a 2 cpu system causing an issue with an application using a serial modem on COM1.

The application threw an error along the lines of ‘noise on line’ which I didn’t quite believe and when I spoke to the software support for this app the solution was to set the process affinity to just one of the two processors in Task Manager.

A more permanent solution is to use affinity.exe which will set the process affinity as it’s launched I think – I never bothered to find out as I just moved the app to a single processor machine.

Interesting though.