Ubuntu 13.10 PHP 5.5.x mcrypt missing–fatal error:undefined function mcrypt_encrypt ()!

Source: Internet
Author: User
Tags mcrypt

[Original]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 is:

    1. Apache 2.4 is not working with default previous installation and configuration and I had to remove it (complete Ly Uninstall/purge and Autoremove) and install it again.
    2. all the virtual host setting do not work. I do not go for opting to change the Include setting in apache2.conf instead I rewrote all the settings myself.
    3. another annoying and very strange problem was, PHP and its libraries. First I had problems with installing Apache module, this connects to PHP. Secondly I had problems of missing MCrypt library which is required for couple of projects on my system. Particularly a project developed in Zend 1.11 and phpMyAdmin do not work. I had the following error where I had written some methods for AES encryption with PHP ' s MCrypt library.
Mcrypt_encrypt()

I thought the MCrypt Library was missing in my PHP installation and I simply tried to install it via command line as Follo Ws:

$ su doapt-get install php5-mcrypt 

And I got the following:

Package lists ... Donebuilding Dependency Tree State       information ... Donephp5-mcrypt is already the newest version. Not upgraded. 

Weird. If It is a already there why isn ' t it working with my projects? Then I Googled to sometime and could not find exact solution anywhere. I tried to look the INI in/etc/php5/conf.d/and there is mcrypt.ini file with quite proper content in it:

Moduleextension=mcrypt.    So

Again I pulled my hair out and went out for the tea. Then I came and tried to look in the other folders Inside/etc/php5 folder and saw there mods-available which had again so Me INI files in it 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 APAC He 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 would help others who is facing the same issue.

Ubuntu 13.10 PHP 5.5.x mcrypt missing–fatal error:undefined function mcrypt_encrypt ()!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.