Wondering if you got all instances of SA-CORE-2014-005 patched?

Assuming you have locate installed/setup:

locate database.inc | grep "database/database.inc" | xargs grep "\$data "

Will output any copies of database.inc that are not patched.

Simon Lindsay Fri, 10/17/2014 - 08:54
DOMDocument, DOMXPath and invalid html

I've been doing some work with DOMDocument and DOMXPath to parse webpages recently, and even though I could get the XPath directly from Firefox or Chrome, it would not match in the $xpath->query();

What I found is that the $dom->LoadHTML($page); will handle invalid HTML, but mostly just by stripping it out.

This is fine, unless you depend on the structure for the XPath query.

Simon Lindsay Sat, 05/10/2014 - 09:13
Run drush as a specific user?

Some contrib modules have drush commands, you may need to specify a user on the command line to get the correct permissions. Older versions of node_export module had this issue, and the drush command needed is:

drush --user=1 node-export
Simon Lindsay Mon, 07/01/2013 - 13:24

Speed up loading Drupal database into mysql

I've developed a little script over the years that dumps production databases, and loads them locally on demand, and its been very handy.

However, it was taking ages to load a database on a Virtualbox ubuntu environment I use for debugging with Zend.

A quick look into it, and I found that i'd put


on the mysqldump command sometime in the past.

I changed that to

--add-locks --extended-insert

and the loading has gone from over 12 hours (I was asleep, not waiting for it ;-) down to 30 minutes.

New CCK module to accept signatures on *Pad devices

With all the new *Pad style devices coming out now, I wanted to be able to get signoff by customers on the spot using a signature for quotes, jobs etc in our drupal based ERP system.

This module facilitates that by allowing creation of a CCK field which accepts input via mouse, finger, stylus or anything that can draw on the screen.

You can grab the cck module here:


or try it out for yourself here:

Simon Lindsay Thu, 11/04/2010 - 17:16
drupaldownunder registrations are now open

The guys at http://drupaldownunder.org/ have been busy, and registrations for the biggest Drupal gathering in Australia are now open.

Dries Buytaert, Josh Koenig, Allie Micka and Josh Waihi are some of the Drupal rock stars coming, get your ticket and book your accommodation, it should be a great couple of days.


Simon Lindsay Tue, 11/02/2010 - 12:16
More than 9 years using and programming with Drupal

Oh wow, I was just updating issues on the erp project, and happened to notice that my user profile says 9 years and 4 days  since I joined drupal.org.

Given that I was already getting into Drupal before drupal.org even existed, that means i've been using this CMS for a Looooooong time.

Simon Lindsay Sat, 04/03/2010 - 11:58
Yay, got adsense & analytics working together again!

For about a month, the adsense clicks and impressions have stopped showing up in my google account, and its been driving me batty tryig to figure out what it was.

I finally found it last night, a tiny setting in the drupal google analytics module in advanced settings where is says "Track AdSense ads - If checked, your AdSense ads will be tracked in your Google Analytics account."

Simon Lindsay Tue, 06/09/2009 - 12:16