Rick's Tech Talk

All Tech Talk, Most of the Time

The Process of Elimination

A few nights ago, I tried to upgrade the CMS that powers this BLOG (Drupal). A Drupal upgrade involves an intricate but manageable series of steps, and since I have UNIX shell access with my hosting provider, it should have been straight-forward. Instead, after finishing the upgrade, my site produced a blank screen with this message: "Zero Sized Reply."

I think everyone's first instinct these days is to search "the web" for this error. Simple enough, right? Except the error is quite general. It basically means "something failed." But what failed? I had just upgraded my Drupal from 6.6 to 6.10, which included upgrading four modules and some theme files. Which one of these changes caused the "Zero Sized Reply" error?

What was even more confusing was that I had run into this upgrade issue before, back in early March. I reverted back to version 6.6, not interested in "debugging" the issue that first time. When I began the upgrade work again, I practiced the install locally, installing all of the CMS software on my PC. The upgrade worked flawlessly on this "testing environment", but to be fair, the environments were pretty different (PHP 4 versus PHP 5, Windows versus UNIX).

So there I was, a "Zero Sized Reply" error staring at me. It was at this point that I started the process of elimination. Maybe the core Drupal software was failing (doubtful). Maybe it was the server configuration. Maybe it was my add-ons. I didn't know where the failure was. In a NearlyFreeSpeech forum post, this interesting recommendation came: replace Drupal's index.php code with some simpler PHP code. I used this:

  1. <html>
  2.     <head>
  3.         <title>Rick's Drupal</title>
  4.     </head>
  5.     <body>
  6.         <?php
  7.         echo "Hi, I'm a PHP script!";
  8.         ?>
  9.     </body>
  10. </html>

Now when I accessed any Drupal URLs, my server ran this little script instead of executing Drupal code. And this new index.php got rid of the "Zero Sized Reply" error! Of course, it also effectively got removed Drupal, but at least I definitively eliminated my hosting server's Apache/PHP configuration. The "Zero Sized Reply" error was being caused by software, not server configuration. I restored the index.php.

Since I had four add-on modules, I started the laborious process of eliminating those modules one by one. One of the guiding principles behind the process of elimination is to eliminate one thing at a time. This way you can be assured that the piece you eliminate is the cause of the problem. One by one I removed the four modules (Views, Image, GeSHi Filter, Advanced Help). After each eliminated module, my site continued to exhibit the "Zero Sized Reply" error.

By now, I was discouraged. What was left? The theme I was using, Zen, is certainly an add-on to Drupal, but that couldn't cause an error. Or could it? This is the other guiding principle: eliminate everything. So I removed the Theme, and guess what? My site began to function again. It lost its customized style, but at least I can get to the posts again.

As I write this, I have yet to solve the issue. The error is probably due to some change that I must have made while extending the theme that was somehow incompatible with Drupal 6.10 on Linux (because remember, the theme worked for me on Drupal 6.10 on Windows). At least I know where I have to spend my energy. I'm in a better place, thanks to the process of elimination.

For now, I'm running with a slightly customized Garland theme.