Beware Windows Update..

Well, that's an hour and half of my life I won't get back, as they say on the imdb.

It was when I was picking up my monitor to smash it vigourously against the wall that somehow my mouse ended up in Internet Explorer's tool menu. NO WAY! Problem solved. But I'm getting ahead of myself...

So I'm working on a site. I have a live version, and a local version, which is how I roll. Before uploading changes to the live version (a script, of course), I check the local version in a few common web browsers. I check Internet Explorer, not only because it's started shaping into a half-decent browser, but because bucket-loads of people use it.

The once-beautiful site looks like crap. My magically transforming image menu shows clipped images at the original size. The whole page has a weird border around it, as do other elements. I start shaking my head.

You see, I'd just finished a rather wonderful automatic style-parsing thingie on the local version, global changes, and so I started to suspect my work has somehow made the site IE-Incompatible. Oh.. bugger!

I view the source - they are identical. I download the style sheets from the local and live versions - identical (my magic is transparent!). Everything identical (save the auto-live-specific stuff, Google Analytics codes and what-not). Now I really start to scratch my head.. two identical sets of code, in tabs of the exact same browser, look completely different. How the hell?..

Reluctantly, I switch on Internet Explorer's new and improved "dev tools" and compare the styles. Of course, IE dev tools doesn't let me get at the actual CSS, only "computed" styles. It saves them that way, too. Regardless, the two sets of styles are now wildly different. Huh?

By the near-end of my frustration I have re-downloaded the entire live site to a second test mirror, tested it (AOK!) and switched the entire file set into the local copy. To hell with the last two hours work! I'll just start again from scratch!

So with a complete copy of the live site files sitting in my local mirror, I do a quick test before beginning again. Again, it's broken. WHAT?

I restart my system, my server, even my router. Empty every cache, delete every session file. It's still broken. THIS IS NOT HAPPENING, I try to convince myself, but it is.

Now, I know from my long and arduous web training that what I am seeing in front of me is simply not possible, at least, not from anything I'm doing. Ye cannae defy the laws of physics! Which I then decide to demonstrate with my nice big monitor and the far wall. And the mouse skips to..

Tools >> Compatibility View

It is checked. How can this be? Then it hits me! Windows update! One just happened.

I un-check the you-bastard-menu-item and head into compatibility view settings where low and behold, there is a also a nice setting for "Display Intranet Sites in Compatibility View", also checked. Microsoft, I love you!

Clever Internet Explorer had worked out that my local site was local, and thoughtfully decided to fuck it up for me on a persistent, per-site basis. I cannot fathom the logic behind this.

Possibly time for a Tulsi Brahmi,
for now..


Apache.. BLANK stare..

I discovered an interesting and potentially useful (and potentially disastrous) undocumented feature in Apache's mod_rewrite today.

I had switched to a live view of a "/readme.php" file, fully expecting to have my request rewritten to "/", when up pops the raw html view of readme.php. That's not right, I thought. Especially as I had tested that rewrite rule only minutes ago, with another readme.php in the same tree.

After a wee while scratching my head and testing, I discovered something interesting. The clue was the location. I was editing an image gallery template, which is stored in /Gallery/[BLANK]/. Slowly, it dawned on me.. Surely not..

Yes. If your path has the string "BLANK" (upper case, no quotes) in it, mod_rewrite ignore it. I know, wow!, eh?

However, for a local dev mirror templates folder (which it is) it's actually pretty handy, enabling you to view raw versions of files which are (if you use rewriting to prevent direct access to such things, as most sane webmasters do) normally hard to render without messing with your .htaccess file.

At any rate, good to know,
for now..


p.s. if anyone has the time to scout through the Apache source and figure out why this happens, please do let me know!

 ©  2024 « » 24.7.17  

Welcome to!

I'm always messing around with the back-end.. See a bug? Wait a minute and try again. Still see a bug? Mail Me!