sudo apt-get install php5-gd

sudo apt-get install php5-mysql
sudo /etc/init.d/apache2 restart