I just followed the tutorial located at https://www.digitalocean.com/community/articles/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu while fixing multiple other er
Try this:
sudo apt-get install mcrypt php5-mcrypt; php5enmod mcrypt; service apache2 restart