Blog | Admin | Archives | Random | Recent | Thanks
    • Commute
    • Meat, bread, and succotash.
    • Happy Easter from the Isle of Wight!
    • Martenitsas for Spring

The Big Move

I have been on a upgrading streak as of late, and my Blog was the most recent target. I have now officially – and finally – upgraded to WordPress 1.5.

Upgrading while maintaining the same look took a little bit of work, but it was not over the top. My favorite new feature is the paging system, which replaces my partial post hack.

Of course, this means that my other main WordPress hack – the “I am Human” comment checkbox – is also gone. We shall see if the auto-whitelisting system works out. If not, you may see me hacking away once again. In fact, I already hacked WP 1.5 once already – to remove the annoying <h2>’s surrounding the link categories.

If anyone discovers any strangeness after this move, please let me know and I’ll see what I can do to fix it.

Future plans include an upgrade to Gallery2 along with the WPG2 plugin which combines WordPress and Gallery 2. However, so far, my experiences with Gallery 2 have been less than stellar. For example, I hate the sidebar and want it to die, but haven’t found that option yet, if it exists. Also, I have been unable to find where to change the name of the main Gallery. Stupid, but vastly annoying. If anyone can point me in the right direction, that would be great.


I returned a 19″ LCD screen to Fry’s today and ended up picking up a gigabit Ethernet PCI card and a gigabit Cardbus card. The PCI card is now in oasis, so now I can load really really really fast. Actually, the reason behind the move is primarily that I moved my 100gb hard drive from an external enclosure connected by firewire (which enclosure I believe was beginning to fail) to an internal slot in oasis. So now the data is always available 24/7 and I don’t have any of the annoying startup issues I as seeing where the drive wouldn’t be recognized for several minutes. And its super duper faaaast.

Upgrades now run on oasis.

This means:

  • Intel Pentium III 500 MHz -> AMD Athlon 600 MHz
  • 128 MB RAM -> 640 MB RAM
  • CD-ROM drive -> DVD-ROM drive
  • 43 GB total storage -> 143 GB total storage

Among other things. Long live the new host of!

Appropriate pages will eventually be updated. This project took most of my weekend, due to technical difficulties that I might get around to describing some day.


Props to whoever discovers and identifies the recent changes to the ‘blog. I’m looking for two items.

Seamless PHP 5

Unfortunately as I learned about a week ago, PHP 4 and PHP 5 don’t happily co-habitate. However, the switch between the two is about as seemless as possible. Compiling PHP 5 with the same config string as I used for PHP 4, I was able to switch over by simply changing a comment in my httpd.conf file from:

LoadModule php4_module modules/
# LoadModule php5_module modules/


#LoadModule php4_module modules/
LoadModule php5_module modules/

Linux isn’t always great, but sometimes it sure rocks my socks.

Referer Spam Countermeasures

Like all spam, referer spam takes what could be useful – in this case, information where people come from to a site – and make it mostly useless – just more links for google to index. However, one of the unique aspects of referer spam also makes it easier to counter than many other types of spam. Generally, referer spam must surpass a threshold – usually, the top ten referrers, to be listed at all on a site. This means that instead of spreading out the referrers, referrer spam generally all points to one place. Which makes it easy to implement a simple anti-referer-spam script like the one I came up with to help fight referer spam on Theo’s blog:

// Ryan's anti-spam hack starts here
$spam_words = file('spam_words');
foreach($spam_words as $spam_word)
if(stristr($_SERVER['HTTP_REFERER'],rtrim($spam_word)) !== false)
die("You look like you're trying to refer spam this site with this word: $spam_word".
'If not, sorry for the inconvenience and please '.
'<a href="'.$_SERVER['PHP_SELF'].'">click here to continue</a>');
// End Ryan's anti-spam hack

Then, as a companion, a post-facto script that can be called from the command line or from the web:

mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
$spam_words = file('spam_words');
foreach($spam_words as $spam_word)
// echo $spam_word;
$spam_word = rtrim($spam_word);
$sql = "DELETE FROM `evo_hitlog` WHERE `referingURL` LIKE '%$spam_word%'";
echo $sql . "n";

Then, the admin can simply periodically check their top referer output, and if they see a bad guy creeping up, add an appropriate word to their spam_words file and run the killoldspam.php script. The bad stuff goes away and can never come back. Best of all, its not very intrusive to the average visitor, even when they are accidently flagged. Javascript or a meta or http redirect could make it less annoying still.

Double-O-Seven (0:07)

Ok, I just noticed something really wierd. All my posts on the main page say they were make 7 minutes after the top of the hour. Then every post made in June says it was 6 minutes after the hour… and May is five minutes… so, um, yeah. When did that happen?


With some timely help from the great and humble Theo, I was able to quickly track down the problem in my options. Somehow, I ended up with months for minutes and didn’t realize it. I haven’t changed those options, that I remember, for quite some time, so I must have really missed something or recently screwed it up without realizing it.

But now the mystery is solved. Thanks for tuning in.

For a while there, I guess everyone just believed that I was a crazy-consistent blogger of some sort. Ha.