Ubuntu 13.10 PHP 5.5.x mcrypt missing – Fatal Error: Undefined function mcrypt_encrypt()!

[原文]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:

  1. Apache 2.4 was not working with default previous installation and configuration and I had to remove it (completely uninstall/purge and autoremove) and install it again.
  2. All the virtual host setting did not work. I did 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 that PHP and its libraries. First I had problems with installing apache module that 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 did not work. I had the following error where I had written some methods for AES encryption with PHP’s mcrypt library.
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.

时间: 2024-10-17 09:31:09

Ubuntu 13.10 PHP 5.5.x mcrypt missing – Fatal Error: Undefined function mcrypt_encrypt()!的相关文章

【转】Install SmartGit via PPA in Ubuntu 13.10/13.04/12.04/Linux Mint

原文网址:http://ubuntuhandbook.org/index.php/2013/09/install-smartgit-via-ppa-ubuntu-linux-mint/ This tutorial will show you how to install SmartGit/HG easily via PPA in Ubuntu 13.10, Ubuntu 13.04, Ubuntu 12.04, Ubuntu 12.10 and Linux Mint. As you may kn

ubuntu 13.10 编译安装conkeror

conkeror几年前我用过,还是一个不错的浏览器,这次因为笔记本只支持Ubuntu 13.10, 而不支持更新版本,就尝试着在Ubuntu 13.10上安装最新conkeror,但是没想到居然没有安装源.于是就编译吧, 当然还是要首先clone到源代码: git clone git://repo.or.cz/conkeror.git 然后根据官方文档的提示: To build your own Conkeror package, install fakeroot, quilt, and deb

ubuntu 13.10 Rhythmbox不能播放mp3 和中文乱码的问题

1.ubuntu 13.10 Rhythmbox不能播放mp3的解决方法 软件中心搜索(ubuntu额外的版权受限软件)不带括号 2.中文乱码问题解决方法: 终端顺序操作 : 1.  sudo gedit ~/.profile 2. 文件最后加入以下内容 export GST_ID3_TAG_ENCODING=GBK:UTF-8:GB18030 export GST_ID3V2_TAG_ENCODING=GBK:UTF-8:GB18030 保存退出 3. source ~/.profile 4.

Installing teamviewer 9 on 64-bit Ubuntu 13.10 (转载)

While trying to install Teamviewer 9 on 64-bit Ubuntu 13.10, you’ll get a dependencies error such as this: Unpacking teamviewer (from teamviewer_linux_x64.deb) ... dpkg: dependency problems prevent configuration of teamviewer:  teamviewer depends on

Ubuntu 13.10装好系统后大配置

安装后的配置,尽量按顺序来吧. 1. 更改软件源 习惯性的改163源了. 软件和更新 -> 下载自 -> 其他站点,http://mirrors.163.com/ubuntu. 顺道顶栏Tab菜单,其它软件,附加驱动,该勾的勾上. 2. update & upgrade 1 sudo apt-get update && sudo apt-get upgrade 3. gnome3   sudo apt-get install gnome-shell 注销,在登录界面选择

Ubuntu 13.10上用户如何获得root权限,用户如何获得永久root权限,如果配置root登录

一.用户如何获得root权限: 1. 进入terminal 2. 输入sudo  passwd root   并设置密码,提示要你输入两次密码,自己设定密码,一定要记住,然后切换到root使用 3. 输入 su root, 要求你输入密码,然后输入刚才设定的密码回车就进去了 4. 如果不想切换root但是想拥有大部分root权限,可以在使用命令时候加上sudo, sudo mount挂载 sudo 命令 ...... another 如果你想在linux上切换用户,那么输入 su  + 用户名就

[转载]Deploying Python with uWSGI and Nginx on Ubuntu 13.10

http://perlmaven.com/deploying-pyton-with-uwsgi-on-ubuntu-13-10 The following is a tutorial on how to set up uWSGI with an Nginx front end to server simple Python scripts. In this tutorial we will only use the packages that are supplied by Ubuntu. It

Fix invisible cursor issue in Ubuntu 13.10

Fix invisible cursor issue in Ubuntu 13.10 Fixing this problem is rather too easy. Open a terminal (Ctrl+Alt+T) and use the following command: gsettings set org.gnome.settings-daemon.plugins.cursor active false You'll have to work a bit to copy this

Ubuntu 13.10 下编译Hadoop2.4.0

在http://www.aboutyun.com/thread-8130-1-1.html 这里看到到,安装过程遇到了上面说的问题,所以将此文转载过来,以备不时之需,感谢此作者. 问题导读: 1.如果获取hadoop src  maven包? 2.编译hadoop需要装哪些软件? 3.如何编译hadoop2.4? 扩展: 编译hadoop为何安装这些软件? 一.首先下载hadoop源码包 下载的方式还是比较多的 1.svn的方式 svn下载首先需要安装SVN,如果想尝试使用svn,可以参考源码管