Over-generalising a little in some parts there:

The location of your php.ini may have changed. It’s probably now in /etc/php5/apache2/

apt-get install php5-mysql php5-gd will do the job of installing…

Maybe so on Debian or a Debian-based system (including Ubuntu), but certainly not the case for all Linux distros, or other OSes.