I use the PHP mycrypt extension to generate some encrypted URLs for one of my online applications. I had reason to test some of this functionality on my local development web server recently and the following error was thrown by PHP:
Call to undefined function mcrypt_create_iv()
Turns out that I didn’t actually have the MCRYPT extension installed on my little Ubuntu web server. Doing so was simply a matter of typing this at a command prompt:
sudo apt-get install php5-mcrypt
And that’s it. No need to re-start Apache or anything else. Groovy.