Assuming you are using debian linux (I am using Linux mint 12, the problem was on the Ubuntu 12.04.1 LTS server on which I was ssh'ed.)
I suggest taking @dkamins advice and make sure you have mcrypt installed and active when installing php5. Use "sudo apt-get install php5-mcrypt" to install. My notes are below.
Using the PHP version of PHP Version 5.3.10-1ubuntu3.4 , if you open phpinfo (), as suggested by @John Conde, what do you do by creating a test file on a web server (for example, create a testphp.php status page only with the content "" anywhere available on the server through the browser)
I did not find that the status is enabled or disabled on the status page when opening in the browser. When I then opened the php.ini file mentioned by @Anthony Forloney, thinking to uncomment ;extension=php_mcrypt.dll to extension=php_mcrypt.dll
I switched it back and forth and restarted Apache (I am running Apache2 and you can restart in my setup using sudo /etc/init.d/apache2 restart or when you are only sudo restart in this directory, I suppose) with the change and unchanged, but all do not go. I took @dkamins advice and went to install the package with "sudo apt-get install php5-mcrypt" and then restarted apache as above. Then my error went away and my application worked perfectly.
beiping_troop Oct 19 '12 at 11:11 2012-10-19 11:11
source share