Death of a Dictator

I had a long post written up about the execution of Saddam Hussein. I decided at the last minute to not click the “Submit” button. But, my friend Niran wrote up an eloquent post that says it much more clearly.

One thing I’d add is this: I’m truly curious about the proportion of the American population that think Saddam was executed as part of the War on Terror, or to grant democracy in Iraq. His execution had nothing to do with either (no WMDs have ever been found, and execution by a foreign power – even through a fledgling local puppet government – is no way to instill democracy).

Trouble with cron.php in a Drupal multisite configuration

I’m running a couple of servers full of Drupal sites hosted in a multisite configuration (one copy of Drupal used to host dozens of sites, each with their own sites/sitename directory. I’d been using sympal_scripts to automatically run Drupal’s cron.php script for each site in order to keep search indexes up to date and run other routine maintenance functions as expected. It’s easy enough to drop a curl http://server/site/curl.php into a crontab, but as you start adding sites to the server, it becomes unwieldy to maintain a current crontab of sites to cron.

Sympal_scripts attempts to read through the scripts directory, poking through each site and loading Drupal for each one in order to fire off the appropriate cron.php. It’s been adding records to the Drupal watchdog table, so I expected it to be working just fine. Except it hasn’t actually been running cron.php – it’s been failing silently.

Looks like there’s something funky in the way Drupal refers to the $base_url variable for the site. It’s set in each settings.php file, so it should be as simple as returning the content of a string variable. But it’s borking, and returning the name of the directory containing the site’s settings.php file.

Say I’ve got a server, myserver.com, with a bunch of sites all configured to be served as subdirectories of that server’s main website, such as myserver.com/site1 and myserver.com/site2

Each site has a respective directory within the Drupal installation’s sites directory, such as myserver.com.site1 and myserver.com.site2 (the / are converted to . for use in the directory name because / would be invalid in a directory or filename).

When Drupal is initialized by sympal_scripts/cron.php, it’s getting $base_url values of http://myserver.com.site1 and http://myserver.com.site2.

So, when it goes to fire off the cron task, it’s using urls like: http://myserver.com.site1/cron.php

It works fine on sites configured to run on their own domain, as the domain matches the site directory.

WTF? The http:// shows that it’s reading the value within each settings.php file (or does it?), but why is it retaining the .site1 rather than /site1?

Failing that, is there a better way to reliably run cron.php on a bunch of hosted sites? I’m thinking of writing a script that crawls the sites directory and pulls out the $base_url values for each site and then fires off a curl base_url on the lot of them.

It’d be really cool if Drupal’s own cron.php had a command-line version, capable of operating on any (or all) configured sites. Any ideas?

Skype says: Use your nothing, or lose it forever!

Just got a funny automated email from Skype, reminding me to use up my Skype credits before they expire. But I’ve used up my credits long, long ago…

Hi there dlnorman ,

It appears that you haven't used any of your Skype Credit for a while now. Skype expires inactive credit balances and you have 30 days left to take action to keep your credit.

Your account details:

Skype Name: dlnorman Balance: CAD 0.00 Expiry date: 2007-01-29 00:00:00+01

I’ll be sure I use that credit up. Maybe I’ll call nobody, for zero minutes. That should just about do it. Phew!

On Setting up an Ubuntu Server

For a project I’m involved with, we’re setting up a shiny new server to handle hosting of lots (and lots) of Drupal sites in a shared hosting environment. We were able to pick up a decently speced Dell PowerEdge 2950 at a really good price. Dell wanted a tonne of cash to pre-install RedHat on the box. Um, no thanks. So, our friendly neighbourhood colocation provider installed Ubuntu Server on the box for me (I’m about 1000 km from the server, so couldn’t actually do the physical install myself). The PowerEdge is a 2xdual core Xeon, similarly speced as the new Xeon XServes, but not as nicely packaged. This one requires 2U of rackspace, where the XServe is shoehorned into a single 1U slot.

We hit a minor snag with the configuration – the onboard NICs weren’t properly lighting up. Some quick Googling, and I believe the solution was found in this thread, and involved running this:

chroot /target

fix initrd

echo megaraid_sas >> /etc/mkinitramfs/modules cp /boot/initrd.img-2.6.15-26-amd64-server /boot/initrd.img-2.6.15-26-amd64-server.old mkinitramfs -o /boot/initrd.img-2.6.15-26-amd64-server 2.6.15-26-amd64-server

After that, everything came up roses. Once I had my admin account, it was pretty trivial to get the rest of the bits set up. I had some minor stumbling when trying to build httrack from source, but a tip from this thread led me to the quick command to install the full developer’s toolkit:

sudo apt-get install build-essential

The whole apt-get stuff is pretty sweet. It’s what Fink and darwinports on MacOSX aspire to, but don’t quite reach. Want to install emacs? It’s just a quick sudo apt-get install emacs away. Easy peasy. Databases, ImageMagick, etc… All trivially installed and updated.

Ubuntu Server Logo

So far, setting this server up has been absolutely trivial. And it’s so stinky fast that it should serve the project for quite some time. I might need to set up an Ubuntu client or server locally to play a bit more. It’s not quite MacOSX, but from a server perspective, it’s pretty close. Actually, having spent about 6+ years dabbling in MacOSX’s UNIXy innards, running an Ubuntu Server is not much of a stretch. The biggest adjustment is learning where all of the various bits are installed, but that’s easy. I’ll be spending a fair bit of time over the break, getting my feet wet in Ubuntu. Should be fun!

I’m in the EdTechPost Top 12 Edublogs!

Holy crap! D’Arcy Norman dot net is listed in the EdTechPost Top 12 Edublogs list!

That’s so freaking awesome. Thank you so much! I would like to also thank all of the little people (you know who you are) who helped me make this milestone possible. It’s things like this that make blogging worth all of the hassles, the paparazzi, the extreme financial burden, and the constant continuous partial attention. Wow.

And, I get to brag about the awesome company I’m keeping on The List. Stephen Downes. Alan Levine. Brian Lamb. Bryan Alexander. George Siemens. And it just goes on and on like that! Wow. Seriously. I’m blushing here.

I even got a cool badge to post on my blog! Check it out: EdTechPost top 12 edublog badge

I’ve got to go pack now. I’m heading to Malawi to adopt some orphans before Madonna gets them all.

Revenue Canada Netfile website only available during office hours?

I just tried to file my GST payment for the quarter, using the GST Netfile website. I figured it’d be the easiest way to do it, with the whole process taking maybe 5 minutes. I’m trying to be a responsible little consultant, filing proper papers and paying The Man to let me do it.

But, the business end of the NetFile website is actually unavailable outside of regular office hours. I don’t think they back the website with a database. It must actually fire off submissions directly to the desk of an overworked civil servant. Probably for security reasons, they don’t even hook the website up to a printer, where the pages could safely stack up in someone’s inbox. Nope. They just flash the numbers at someone in realtime. Maybe there’s a cool Wall Street ticker wrapping around the internet call centre or something.

Regardless, here’s what the website says now:

GST Netfile error

It’s comforting to know that the revenue collection system of a country with 30 million people is turned off when someone isn’t at their desk. How do they schedule potty breaks for the website monitors?

More ways to serve you, indeed.

Hello, Revenue Canada? I’m trying to give you money. Cough up for a database server already. Oh, wait. The last database built by our federal government wound up costing us over a billion dollars. Give me a shout. I’ll build you one for half that.

5 Things Tag

Dang. I got tagged with the Five Things Meme a couple days ago, but procrastinated on responding. Then, I just got tagged again. Better play before the tags build up…

So, five little-known things about me. Without feeding identity thieves, hopefully…

  1. I’m not a programmer. I suck as a programmer. I’m a total hack. I know just enough to let me get into trouble, but I’m too stubborn to give up until something kinda sorta almost works. potaytoe, potahtoe…
  2. I’m a huge introvert. Is that an oxymoron? I get uncomfortable in crowds. I hate talking on the phone. And yet, I can get in front of a group and give presentations and participate in discussions etc… For some reason, I seem to be much more coherent in group settings (including writing on my blog) than I am normally. wtf?
  3. First job – “fabric folder” at Angel Distributing, the company that provided fabric to all of the Fanny’s fabric stores. Got to work with the reams of fabric, splitting and rolling into the little bundles that get trucked to the stores for scrapbookers and crafty folks to make all kinds of crappy stuff. Got to see all kinds of nice foreign bugs that hitchhiked into Canada along with the fabric…
  4. I still haven’t finished my MSc. Actually, it’s been so long that all of my coursework has expired. I’ll get to start from scratch once someone convinces me it’s worth doing. It’s not very high on my list at the moment.
  5. Met my wife while we were both working at Heritage Park 16 years ago as a summer job. She’s still putting up with me… Who says workplace relationships are a bad idea? We worked together for 3 years.

I guess I should tag a few more folks. If I had to do this, I’m bringing y’all down with me! Alan, Brian, Cole, Paul and Josh.