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:
- 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.
- 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.
- 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.
Ubuntu 13.10 PHP 5.5.x mcrypt missing – Fatal Error: Undefined function mcrypt_encrypt()!的更多相关文章
- ubuntu 13.10 mono asp.net服务 安装
ubuntu 13.10 从官方文档http://www.mono-project.com/Mod_mono 可看到 Mod_Mono is an Apache 2.0/2.2/2.4.3 modul ...
- ubuntu 13.10 monodevelop3 安装
版本 ubuntu 13.10 桌面模式默认:unity :文件管理器:nautilus
- ubuntu 13.10 Ralink RT3290 无线与蓝牙4.0的驱动安装
我的本是hp envy15, 蓝牙与无线的型号是Ralink RT3290, 装了Ubuntu 13.10 64bit后,蓝牙无法使用,无线几秒钟就会断开,查知,是因为驱动问题. ## 准备工作 首先 ...
- ubuntu 13.10 amd64安装ia32-libs
很多软件只有32位的,有的依赖32位库还挺严重的:从ubuntu 13.10已经废弃了ia32-libs,但可以使用多架构,安装软件或包apt-get install program:i386.有的还 ...
- Ubuntu 13.10 安装 ia32-lib
Ubuntu 13.10下面不参直接安装ia32-libs,直接安装的时候会提示下面的信息: output$ sudo apt-get install ia32-libs Reading packag ...
- 在 Ubuntu 13.10 中搭建Java开发环境 - 懒人版
本文记录我在Ubuntu 13.10中搭建Java开发环境. 本文环境: Ubuntu 13.10 x64运行在Win7下的VMware Workstation 10中. 1. 安装JDK与JRE s ...
- Ubuntu 13.10 安装Qt5
Qt5在Ubuntu的软件中心是找不到的,只能从Qt的官网下载安装. http://qt-project.org/downloads,选择完整的Linux版本(qt-linux-opensource- ...
- Ubuntu 13.10 中文字体设置
据我查到的资料,在默认设置下,Ubuntu 13.10 中文使用的是文泉驿正黑.我总觉得它的效果有些发虚,模糊,不满意. (貌似是Ubuntu从13.04开始取消了默认的微米黑,回退为之前的正黑.这我 ...
- VMWare10安装Ubuntu 13.10过程
把这当成自己的第一篇文章吧,准备工作环境切换到linux,选择Ubuntu 13.10桌面版,Ubuntu官网下载 先安装VMWare10,这个没什么可说的,安装好后启动,点击"新建虚拟机& ...
随机推荐
- centos nginx install openssl
1.查看是否已经安装 ssl 组件 [root@localhost wwwlogs]# cd /usr/local/nginx/sbin/ [root@localhost sbin]# ./nginx ...
- 编辑UITableviewCell--Editing
self.navigationItem.rightBarButtonItem = self.editButtonItem; - (void)setEditing:(BOOL)editing anima ...
- Asp.Net 如何获取所有控件&如何获取指定类型的所有控件
一. Asp.Net Page页面中访问所有控件的属性为: Page.Controls 控件的结构是树结构. 二.获取指定类型所有控件实例: 1.递归方法定义: private void GetCon ...
- Windows Server 2008安装Memcached笔记
分布式缓存系统Memcached简介与实践 缘起: 在数据驱动的web开发中,经常要重复从数据库中取出相同的数据,这种重复极大的增加了数据库负载.缓存是解决这个问题的好办法.但是ASP.NET中的虽然 ...
- 10个你可能不知道的JavaScript小技巧
1.变量转换 看起来很简单,但据我所看到的,使用构造函数,像Array()或者Number()来进行变量转换是常用的做法.始终使用原始数据类型(有时也称为字面量)来转换变量,这种没有任何额外的影响的做 ...
- Library cache lock 故障解决一例
今天收到同事电话,说是数据库中一张名为acct_balance进行操作是奇慢,第一反映是不是扫行计划有问题,结果我错了,现将过程记录下来. 用pl/sql连上数据库情况:1.对acct_balance ...
- JavaScript之数据类型
1. 种类 5种基本类型:Number.String.Null.Undefined.Boolean 1种对象类型:Object(Function.Array.Date) 特别注意:当把基本类型尝试以对 ...
- [firefly]暗黑源码解析
一.架构 二.各模块详解 1.net 2.gate 3.game 4.db 三.启动 四.举例说明 五.性能测试
- Codevs 3287 货车运输 2013年NOIP全国联赛提高组(带权LCA+并查集+最大生成树)
3287 货车运输 2013年NOIP全国联赛提高组 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond 传送门 题目描述 Description A 国有 n 座 ...
- Codevs 1507 酒厂选址
1507 酒厂选址 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 传送门 题目描述 Description Abstinence(戒酒)岛的居民们酷爱一种无酒精啤酒 ...