The vast majority of changes in this commit are to update from mysql to mysqli.  The rest of the changes are from fallout from changing my computer to php5.4 from 5.3.  This is good as it makes us more future-proof