in MT.Net, X-Geek

MT.Net mystery solved

I think I solved the mystery I was seeing on MT.Net, so now I can tell you what happened.

I’m using the SABRE WordPress plugin to block bot users from wreaking havoc on the MT.Net blogosphere. Earlier this week, a supposed bot passed the SABRE math test, so I decided to crank up the CAPTCHA feature of SABRE to further weed out bots. (Now, I don’t know if it actually was a bot that registered or simply some bored Russian, but I wanted to see what the CAPTCHA did anyway.)

I cranked up the CAPTCHA feature on my other blogs and everything seemed fine: the PNG images of random characters and shapes rendered fine. Here on MT.Net, however, the PNG produced was garbage – every time! The file sizes of the bad images were similar to the good ones, and a look at the file showed the proper PNG header and footer strings. It just wasn’t a real PNG for some reason and I had to find out why! Most alarming was that I was using the same WordPress code on all sites and the same SABRE plugin code as well. How could it be that identical code would produce different results?

I set up another Apache instance on MT.Net with its own configuration files. I created a mirror of my ServerRoot directory and pointed the new instance to that directory. I then fiddled with the new server but got the same results. Very perplexing.

Next I decided to re-create my wp-config.php file using the latest wp-config-sample.php from the WordPress 2.8.4 I’m running. Bingo! The CAPTCHA began working!

It turns out a customization I made to my wp-config.php file was blocking SABRE from drawing a proper PNG image. I checked the wp-config’s being used by the other blogs and, sure enough, I had created those from scratch – that’s why they worked and MT.Net didn’t.

Lesson learned: upgrade everything when upgrading WordPress. Even the trivial stuff can trip you up.