“PHP Warning: mysqli_* expects exactly 2 parameters, 1 given” while converting from the old MySQL extension to MySQLi

September 20, 2018

So, you are trying to migrate a codebase from the deprecated MySQL extension to MySQLi. You’ve carefully changed all the mysql_* function calls to the corresponding mysqli_*. You run your code and…. Your data access code is not working anymore and your output is now littered with warnings like: PHP… Read more

Hidden Reasons Why Migrating from MySQL to MySQLi Procedural may not be as Simple as You Think

September 8, 2018

When starting the migration of a legacy PHP codebase away from the old MySQL extension, a lot of people initially decide to replace it with the MySQLi extension’s procedural interface. On the surface, this seems like the quickest and most straightforward approach. Unfortunately, this is based on a misconception. Although they… Read more

Start Planning to Migrate from the MySQL Extension Now (For Real this Time)

January 20, 2018

So you have a medium to large PHP codebase that is…  well let’s just say it’s not a spring chicken anymore. Not that there’s anything wrong with that. It does what it needs to do and it does that well. So, everything is awesome! Except… Well except that your code… Read more

Q: I’m a beginner stepping into a massive and old PHP codebase, what should I expect?

November 20, 2017

There is no point in trying to sugar-coat this. What you can probably expect, unless you are really lucky,  is a giant smelly hairy mEsS. You will probably find yourself dumped into the middle of a tangle of unreadable, untestable and unstable code wedged dangerously between at least two outdated… Read more