标签:
[原文]http://www.tuicool.com/articles/goto?id=myM7veR
I had updgraded my Ubuntu from 13.04 to 13.10 last week and everything went quite good. The only problems that I faced as developer are:
Fatal Error: Undefined function mcrypt_encrypt()
I thought the mcrypt library was missing in my PHP installation and I simply tried to install it via command line as follows:
$ sudo apt-get install php5-mcrypt
And I got the following:
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-mcrypt is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
Weird . If it is already there why isn’t it working with my projects? Then I Googled for sometime and could not find exact solution anywhere. I tried to look the ini in /etc/php5/conf.d/ and there was mcrypt.ini file with quite proper content in it:
; configuration for php MCrypt module
extension=mcrypt.so
Again I pulled my hair out and went out for the tea. Then I came and tried to look at the other folders inside /etc/php5 folder and saw there mods-available which had again some ini files in it but missing mcrypt.ini. Then I just tried moving that mcrypt.ini file from /etc/php5/conf.d/ to /etc/php5/mods-available/ then restarting the apache server.
$mv /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/
$ sudo service apache2 restart
Then I tried phpmyadmin from the browser, amazingly it worked now !
Hope this will help others who are facing the same issue.
Ubuntu 13.10 PHP 5.5.x mcrypt missing – Fatal Error: Undefined function mcrypt_encrypt()!
标签:
原文地址:http://www.cnblogs.com/ExSystem/p/4423264.html