Tag Archives: lock

The Broken Key in the Bedroom Lock My Life 09 OCT 2013

Our main bedroom’s en-suite bathroom is really, really small. It’s a narrow little rectangle that fits in a shower on the one side, a toilet on the other, and a little basin squished in between the two. This has the effect that if I’m forced to make use of this bathroom, I prefer to lock the bedroom door and leave the bathroom doors open – so that I don’t have to feel trapped in a little claustrophobic space.

Yesterday was work from home day, and with Chantelle out and about and Olga happily cleaning around the house, my bathroom break time forced me into using the bedroom en-suite bathroom for privacy’s sake. Having happily completed my business and about to exit the bedroom, I turned the key in the lock and was surprised by the fact that turning the key presented no give at all. More annoying than surprising was the then subsequent lifting up of the key to examine the key shaft, with the key head still firmly lodged in the lock itself.


country mews bedroom broken key

The broken key. It really is quite ridiculous just how easy this rubbish key snapped. (Seems to be made out of some sort of pewter perhaps?)

After Chantelle finished chuckling at me via the phone, I managed to convince Olga to come to the bedroom door where I instructed her to extract my toolbox from the office and bring it around the house to the bedroom window, where she was forced to then hand me tools through the burglar bars (the toolbox doesn’t fit through the bars in case you’re wondering).

Tools in hand, I then took off the handle and casing and proceeded to extract the key head using nothing other than two small jewel screwdrivers. Feeling very proud of myself, I screwed the handle back on, grabbed the spare key (which is kept on the same bunch as the main bedroom key) and let myself out.

Right, so straight to the Q20 then to ensure this doesn’t happen again thanks to a stiff lock, but more important than that, I don’t think I’m going to be locking that door any more anyway. So hopefully people knock.

Though to be fair, they’ll probably learn pretty quickly should the first couple of days not go so well!

The lock in question - now due for a violent meeting with a can of Q20 lubricant!

The lock in question – now due for a violent meeting with a can of Q20 lubricant!

Replacing Our Front Door Security Gate Lock (aka How to Remove Pop Rivets) My Life 30 MAY 2012

I enjoy the small, self-contained DIY jobs around the house, and my toolbox was called into action a couple of weeks ago, when inexplicably the lock on our metal front door security gate seized, leaving us with no way of opening the gate, meaning no access via the front door and therefore a bit of an inconvenience (though probably not so much when one considers just how much we make use of the front sliding door to gain access to our abode).

Anyway, we phoned up some locksmiths to get a couple of quotes, recoiled at the prices given, and then stepped back to ponder how we were going to proceed.

A day or two into this saga, I received an excited call from Chantelle telling me that a) I need to take her out for an expensive meal or b) I need to feel less manly about myself, as she had managed to get the gate open after lots of patience, prodding and Q20 lubricant, super convinced that she had now fixed the lock as it appeared to be operating smoothly once more.

Sadly for her though, on my arrival home and subsequent test, the lock once again seized, this time with the key stuck in the lock, but thankfully with the gate open, meaning we now had access to the lock mechanism.

Deciding that it would be far cheaper to just replace the lock ourselves, I set about freeing the trapped keys with a set of pliers. As it turned out, I could apply just enough pressure with the extra leverage afforded by the pliers, freeing the key without the extra hassle of breaking it off.

Anyway, next on the agenda was the removal of the pop rivets which hold the lock in place within the metal gate. Some Googling plus a conversation with Monty led me down a path where I combined two of the primary methods used in removing pop rivets, first taking off the heads of the pop rivets with a few hard bashes to the back of a well placed, good quality paint scraper, followed by drilling out the remaining stem of the pop rivet through the use of a metal drill bit just wider than the pop rivet body. (You’ll note that pop rivets come in standard sizes, in my case the ones in use were 4.8 mm pop rivets, meaning I needed to purchase a 5 mm metal drill bit to get the job done.)

Of course, I didn’t have the necessary tools on hand, and so a trip through to Builder’s Warehouse was in order, where of course I spent far longer than intended, and walked out with a whole lot more for my toolbox than intended!

With the rivets removed, I then needed to purchase a similar lock for the security gate, and taking the old lock with me, I returned to Builders Warehouse and purchased a nice middle of the range, well priced 7 lever lock which best fitted the old lock’s dimensions. (Again, the locks are fairly standardized in size, though it is always best to take the old one with for comparison purposes!)

Of course, life doesn’t make things easy for one, and the joy of discovering that these locks are fairly inexpensive turned sour when I discovered that some small differences in rounded ends meant that the new lock couldn’t simply slide into the hole that used to accommodate the old lock – no it was back to Builders Warehouse for a third time in order to purchase a round metal file, needed to make the slot bigger so that the new lock would fit.

So with my new round file and a borrowed straight file from Monty, I set about rasping away at the gate, taking away enough of the messy weld work so that my new lock could smoothly slide in, after which I grabbed my sparkly new pop rivet tool and secured it in place.

Yay, success (and a working security gate) at last!

(And yes, I know the lock is upside down, but only because the original lock was in upside down as well. What, you didn’t think I was going to take off the whole bloody security gate just so that I could flip it the right side up did you?!)

The Broken Key in the Lock My Life 09 APR 2012

I haven’t had to do any DIY for quite some time now, meaning that my tools have been quietly lying packed away, alone in a dark and dingy toolbox that they call home.

Well, that is until the other day, when I got a SMS from Chantelle informing me that I would have to enter the house via the sliding door after work, thus setting off the alarm in the process. The reason? Her front door key had broken off in the lock as she headed out to work earlier in the day.

Fun stuff.

Anyway, I did get home, gain access to the house via the sliding door, somehow avoid setting off the alarm, and after the whole Jessica bedtime routine was done and dusted, grabbed my toolbox and got to work on what proved quite an elusive, and stubborn key fragment!

By this stage it was already dark outside, and I can just imagine what the neighbours must have been thinking, what with this shadowy figure outside, bent over the front door and fiddling with the lock with all manner of tools and picks.

Eventually Chantelle arrived home from her late shift and jumped in to help, and after much jiggling, prodding and cursing, it was the eventual application of good old Q20 lubricant that saved the day, making things slippery enough that we could eventually work the broken part out of the lock mechanism and successfully eject it out of the door.

After removing the lock mechanism and giving it a good look over, I decided that it needed replacement due to the stiffness of the turning action, and so headed out the next morning to purchase a new lock for just under R100. However, on installing it, I noticed that the new lock didn’t quite fit properly thanks to an improperly bevelled lock slit in the frame, meaning that the following day I had to head back to hardware store to purchase a chisel for R50.

Anyway, with the lock slit properly chiselled out, the new lock slid in and out like a charm, marking the end of yet another successful DIY excursion.

Of course, this sweetness wasn’t long lasting, as on the disposal of the old replaced lock, I noticed that the day or two of soaking in Q20 had made the locking action as smooth as a baby’s bum, meaning that pretty much all the money I had just spent, could have been saved if only I had been a little more patient.


MySQL: Prevent Two PHP Scripts from Overwriting One Another’s Table Updates CodeUnit 23 JUN 2010

From day one, the problem with database-driven applications is of course that the potential for two separate scripts to overwrite data being used by one another when run simultaneously is pretty huge.

One of the main ways of dealing with this is to use “locks”, basically allowing one script to lock a particular set of tables, meaning that other scripts can’t make use of those tables until the locks are released.

Using locks with MySQL and PHP is pretty simple if we are keeping things straightforward, and the implementation goes something like this:

mysql_query("LOCK TABLES `mytable` WRITE");
// ...do all your insert queries on `mytable` here...
mysql_query("UNLOCK TABLES");

And it’s as simple as that.

There are two major types of locks available to you, namely WRITE and READ, where WRITE indicates that you wish to read and write to the table and that no one else should be allowed to either alter or read the data while you hold the lock. (Whilst a table is in a WRITE locked state, other requests block until the lock is released).

A READ lock indicates that you wish to read a table but not write to it, and thus by implication means that multiple scripts can all hold a READ lock at once – in fact a script can still read the READ locked table without first requiring a lock at all!

Of course, this is simply scratching the complexity which can be delved into when it comes to table locking, but for a straightforward simple implementation to ensure your precious data isn’t being overwritten when you are busy with a table, the above works perfectly fine!

In other words, nice! :)

Related Link: http://dev.mysql.com/doc/refman/5.0/en/lock-tables.html

How to Unlock Locked Files in Windows CodeUnit 26 MAR 2010

Sometimes Windows can be really, really stingy. For whatever reason, some or other application on Windows may make reference to a particular file on your system which of course results in a locked file – great because it allows for integrity when working with files but not so great when the application stops using a file and Windows simply takes its damn time unlocking the thing again!

Luckily for us though, that clever guy Nir Sofer over at http://www.nirsoft.net came up with the clever little OpenedFilesView application that essentially lists all the currently “open” files on your system, displaying for each open file the handle value, the type of access (read/write/delete), file position as well as the process that opened the file amongst other things. This little app then allows you to essentially force close these open files by either closing the handle via its own interface or alternatively killing the process it indicates is currently locking that annoying file.

In other words, finally the end to annoying error messages like these: