How to fix your broken Drupal cron job
Submitted by dylan on Fri, 05/06/2011 - 10:44amIf your Drupal powered web site suddenly quits running it's cron jobs (you'll see log entries complaining that the task has taken over an hour, or cannot run cron while it's already in progress) you'll probably have a hard time trying to figure out what part of the cron job is hanging it. I know I did.
Here's how to diagnose the problem:
Inside your site's includes folder is a file called module.inc, make a copy of it, and restore this file after the problem is corrected. Now open module.inc and change the part that says:
function module_invoke_all() {
$args = func_get_args();
$hook = $args[0];
unset($args[0]);
$return = array();
foreach (module_implements($hook) as $module) {
$function = $module .'_'. $hook;
$result = call_user_func_array($function, $args);
if (isset($result) && is_array($result)) {
$return = array_merge_recursive($return, $result);
}
else if (isset($result)) {
$return[] = $result;
}
}
return $return;
}
To this code I found buried in the Drupal discussion boards:
function module_invoke_all() {
$args = func_get_args();
$hook = $args[0];
On getting that precious little lock
Submitted by dylan on Mon, 05/02/2011 - 5:48pm
For a variety of reasons I needed to allow people to have encrypted connections to RenditonsDesign.com, so I required a decent SSL certificate. The problem is, you can spend well over $1,000 on these things if you demand a brand-name certificate authority (I wish that was a doctored screen shot). They cost even more if you have multiple domain names you need to secure, like AlGore.org and AlGoreDemcocrats.com for example, both pointing to the same site. And if you want to save money, you may want to buy multiple years. Yeah, I played with the options and easily rung up more than $12,000.00 at Verisgn! Yikes. Is a certificate really worth as much as 4,000 copies of iKnew That!?
To the Xcode 4 team at Apple: Yours... is... superior...
Submitted by dylan on Fri, 04/29/2011 - 9:08pmXcode 4 is to Xcode 3 as Star Trek II: The Wrath of Khan is to Star Trek: The Motion Picture. It's not so much that the earlier offering was bad, as it is that the latter releases were amazing. That's right, the Apple LLVM engine is the Khan Noonien Singh of features, clearly a genetically engineered super technology that is beyond us common folk.
As I'm in the middle of rebuilding the company website and trying to ship the most ambitious product I've ever dared to tackle, I will not sing any further Xcode 4 praises today. But thanks Cupertino. And if anyone is a big enough nerd to recognize the Wrath of Khan reference I made in this post title, I tip my hat to my fellow geek.
Hosting Drupal on OSX 10.5 Server
Submitted by dylan on Fri, 04/29/2011 - 7:12pmThe MacOS is epic, we all know that. Drupal is fairly epic too. It's a powerful open source content management system used by hundreds of thousands of great sites, like The Whitehouse, FedEx, and Popular Science. But hosting Drupal on Mac OS Server is less than simple I'm afraid.
I won't go into all the details right now, but two major issues that pop up right away. 10.5 Leopard Server doesn't include the gd module in their PHP build, which Drupal requires to do it's graphical magic, nor does it include support for MySQL databases through the PDO layer.
I decided to stick with Drupal 6 for now, while I wait for Lion Server (10.7 server) to ship, and then I'll revisit the issue. As for getting the gd library, I just disabled Apple's built-in PHP and used the popular Marc Liyanage PHP Apache Module which saved me the considerable trouble of compiling my own. Thanks Marc!
Does social networking work for indie devs?
Submitted by dylan on Fri, 04/29/2011 - 3:06pmI've been working on a fresh new website for Renditions Design, and one of the major design goals was implementing links both to and from as many of the major social networking sites as seemed feasible. Ask anyone how to drive traffic to your website or get attention for your product these days and they'll tell you to build a big Twitter / Facebook / YouTube / Tumblr, etc. following. Okay fine, I like to socialize as much as the next guy, so I figure it's about time I get the business mixed up in the crazy web-2.0 world of cross-pollenizing social sites.
There are two major problems with this push into the social sphere. First, it's very time consuming (I have to actually use all these social sites to make friends through them). Second, I have absolutely no idea if it will work.
I'll post back here with the thrilling results in a few months when I start to have a better sense of things. Oh, and welcome to the new company blog. :)






