workaround

Fixing Batcache to Send The Correct Content-Type Header

I’m a fan of Batcache, the Memcached-based WordPress full-page cache solution, but I’ve discovered that it ignores the content-type header set when the page is initially generated and re-sends all content with content-type: text/html. I posted a note about this at the WordPress support forums, but then I realized what the problem was: apache_response_headers() doesn’t return the content type, but headers_list() does.

The solution is to replace apache_response_headers() with headers_list() in the code, though headers_list() is PHP 5+ only, so it might be a while before we see a change like this committed. Still, I’ll shamelessly tag Andy Skelton (Batcache’s author) on it.

Calculating Distance Between Points In MySQL

MySQL has some powerful, and perhaps underused spatial extensions, but the most interesting functions are still unimplemented: “Note: Currently, MySQL does not implement these functions…”

Among those as-yet unimplemented functions is DISTANCE(). Alternatives can be found here and here, though neither is clean or simple. I wonder if a simple MBRContains() is good enough, though…

Users vs. Network Printers in WinXP

It’s been a problem we’ve struggled with here for much longer than we should have, and it took a hotshot new guy in desktop support to show us the answer. But if you know the right magic, you can add a printer to Windows XP and make it available to all users. See, if you […] » about 300 words

Fixing position: fixed In IE

It turns out the Internet Explorer doesn’t properly support CSS’s position: fixed. Google led me to the following:

The DoxDesk solution looks promising and simple, but I think bugs elsewhere in my layout are preventing it from working. It’s time to start again from scratch.