From a hack attack to database problem

It’s one awful thing to another. Besides a hack attack that screwed up this blog, another issue showed up which caused another problem.

The symptoms were the same. My blog would display the title and header and the title of the most recent post, the rest of the page, the post content, sidebar and footer would just disappear. As if the page was cut short.

Knowing that the hacking issue has been dealt with, perhaps it’s time to take a look at the plugins I use. So one by one, I deactivated and reactivated all the 34 plugins actively being used by my blog.

It turns out that the culprit, was the Secure and Accessible PHP Contact Form by Mike Cherim and Mike Jolley. So I disabled it to get my blog back up and running normally again.

Compatibility issue with WordPress?

The idea of dropping that plugin and choosing a new one didn’t appeal to me because I’ve been using it for years and it has worked fine until today. It wasn’t really a compatibility issue with WordPress 2.8.5 as my other blogs which also uses the same plugin have never had any problems with it. This was assured by the plugin authors.

So upon their advice, I cleared the error logs in my hosting account and reactivated the plugin. Once the problem once more occurs, it would be logged and a clue to fixing this would be available.

And so the error log gave me the following message:

[27-Oct-2009 18:01:04] PHP Fatal error: Cannot access empty property in /home/jrocasco/public_html/wp-includes/functions.php on line 431

Not knowing PHP that well and not knowing how to fix this, I’ve reported this to plugin author Mike. He then advised me to follow the steps enumerated by someone else who had the same problem years ago with the same PHP Fatal error message:

Always backup your database first in case!

There is a null or empty entry in the options table located in the wordpress database
To fix this you need to login to the cpanel and load the mysql database – phpmyadmin
Select the your wordpress database and choose the wp_options table on the left hand side
Select the browse tab at the top of the page
Show all entries and find the one with an empty option name
Delete the offending entry
This should fix your problem

So via phpMyAdmin, I browsed the wp_options table in my blog’s database and indeed, there was a null or empty entry that has been causing this issue. I deleted it, reactivated the Secure and Accessible PHP Contact Form plugin and I was relieved and happy to see that my blog had started to function normally again.

Now my blog is clean from malicious codes, security has been beefed up and all that is needed to do is to clean up the database over time, with the installation and removal of themes and plugins, have resulted in a database bloated with useless entries and as the master bloggers have said, bloated and dirty databases are often the source of blogging problems that could really wreak havoc in one’s blogging career.

As I’ve mentioned before, I’ve learned a lot about WP security and keeping things neat and lean. I’d be sharing this lessons in the coming posts real soon.

For now, it’s good to know this blog is up and running and go and I wish every blogger a safer blogging experience.

Update: The problem of a null entry in the wp_options table just won’t go away. So for now I’ve decided to stop using the Secure and Accessible PHP Contact Form plugin and replaced it with Contact Form 7 by Takayuki Miyoshi. I still prefer the old contact form plugin but I can’t let it keep on taking down my blog. Hopefully, a fix for this issue would be available soon.

Leave a Reply