博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Ubuntu 13.10 PHP 5.5.x mcrypt missing – Fatal Error: Undefined function mcrypt_encrypt()!
阅读量:4493 次
发布时间:2019-06-08

本文共 2256 字,大约阅读时间需要 7 分钟。

[原文]

 

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... DoneBuilding dependency tree       Reading state information... Donephp5-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 moduleextension=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.

转载于:https://www.cnblogs.com/ExSystem/p/4423264.html

你可能感兴趣的文章
事务同步多线程
查看>>
怎么去掉联系人、通话记录、拨号列表界面中的电话号码中间的空格?
查看>>
node.js常见的一些错误信息
查看>>
PG自动化测试
查看>>
MySQL启动出现The server quit without updating PID file错误解决办法
查看>>
什么是多租户
查看>>
jQuery的效果
查看>>
express node 框架介绍
查看>>
数据库读写分离及问题
查看>>
jquery then详解(三)
查看>>
Python import模块
查看>>
最大间隙问题。给定 n 个实数,求这n个实数在数轴上相邻2个数之间的最大差值,设计解最大间隙问题的线性时间算法。...
查看>>
BUCK/BOOST电路原理分析
查看>>
关于fluorinefx基础和服务器搭建的文章地址
查看>>
基于Dx11写一个自己的游戏引擎--3
查看>>
0428备份
查看>>
JS实现重载
查看>>
Musical Theme
查看>>
Tkinter之Canvas篇(2)
查看>>
Deep Learning 13_深度学习UFLDL教程:Independent Component Analysis_Exercise(斯坦福大学深度学习教程)...
查看>>