We have used three different forms of locks on cabinets. One is shaped in a rectangle with a button in the middle (top does not meet). It worked well if the knobs are perfectly that distance apart, but all have been broken after about a year.
Another has a square on it's side and two loops of notched plastic (looks like a zip tie). Those have not broken for us but are a bit of a pain to open (must hold down two buttons and pull loop). they work on any distance of knobs. Initially we leave them loose enough to pull off one knob, until the child figures that out.
Tot Locks: to prevent drilling too far, my husband put a piece of tape on the drill at the distance he wanted to drill (the ends touched each other like a flag). If you measure your cabinet and the screw and use the tape, there is no reason you should drill through the cabinet. We liked this on our custom cabinets because we did not want knobs (part of a bookcase).
If Tot Locks are too expensive, move stuff around in other cabinets, buy one set ($20 for four) and use it.
Good luck!!