- 浏览: 158304 次
- 性别:
- 来自: 广西
文章分类
最新评论
-
zhuyanjavaeye:
crash_log_path 这个配置是怎么用的?为什么我配置 ...
sphinx(或coreseek)配置文件记录 -
bingxiaotian:
利用memcached做实时分页缓存 -
yehayeah:
楼主说得很好
程序员到底怎么了?
What is MCrypt?
MCrypt is a replacement for the old crypt() package and crypt(1) command, with extensions. It allows developers to use a wide range of encryption functions, without making drastic changes to their code. It allows users to encrypt files or data streams without having to be cryptographers. Above all, it allows you to have some really neat code on your machine.
Site Source : http://mcrypt.sourceforge.net/
Mcrypt is a powerful encryption library containing 22 block algorithms. Specifically, the following algorithms are supported:
Cast-256
DES
Enigma
Gost
LOKI97
Panama
RC2
RC4
RC4-iv
Rijndael-128
Rijndael-192
Rijndael-256
Safer-sk128
Safer-sk64 xtea
Saferplus
Serpent
Threeway
TripleDES
Twofish
Wake
Simple steps: follow these steps to compile Mcrypt and build the extension into your PHP distribution:
2. gunzip mcrypt-x.x.x.tar.gz
3. tar -xvf mcrypt-x.x.x.tar
4. ./configure –disable-posix-threads
5. make
6. make install
7. cd to your PHP directory.
8. ./configure -with-mcrypt=[dir] [--other-configuration-directives]
9. make
10. make install
However, complex and complete steps are given below :
FYI – My machine stats are:
Cent OS 5.0
Apache 2.0
PHP 5.0
Ready? Here’s how you do it.
As root:
1) Install libmcrypt
(2.5.x or better) http://mcrypt.hellug.gr/lib/index.html
-download and uncompress: tar z -xvf xxx.tar.gz
-cd into libmcrypt dir and type: ./configure
-when configure is done type: make
-when make is done type: make install
2) Add the library dir to /etc/ld.so.conf
-edit /etc/ld.so.conf and add: /usr/local/lib
-save file and then type the command: ldconfig
3) Update/Install Mhash (0.8.15 or newer) http://mhash.sourceforge.net/
-download and uncompress: tar z -xvf xxx.tar.gz
-cd into libmcrypt dir and type: ./configure
-when configure is done type: make
-when make is done type: make install
-when make install is done type: ldconfig
4) Install latest version of mcrypt
(2.6.x or better) http://mcrypt.hellug.gr/mcrypt/index.html
-download and uncompress: tar z -xvf xxx.tar.gz
-cd into mcrypt dir and type: ./configure
-when configure is done type: make
-when make is done type: make install
-when make install is done type: ldconfig
5) Take note of your current php info
-create a file somewhere on your webserver called phpinfo.php
-edit the file and add the single line:
-make sure a normal user owns the file (not root – ie: chown user.user phpinfo.php)
-issue the command: chmod 755 phpinfo.php
-open the file in a web browser ie: www.yourserver.com/phpinfo.php
-copy the contents of “Configure Command” to a text file somewhere.
-It will look something like this (probably all on 1 line – leave it on 1 line):
‘./configure’ ‘–with-apxs=/usr/local/apache/bin/apxs’ ‘–with-xml’ ‘–enable-bcmath’
‘–enable-calendar’ ‘–enable-ftp’ ‘–enable-magic-quotes’ ‘–with-mysql’ ‘–with-pear’
‘–enable-sockets’ ‘–enable-track-vars’ ‘–enable-versioning’ ‘–with-zlib’
-edit the command to remove all the ‘ ‘ marks so it looks like this:
./configure –with-apxs=/usr/local/apache/bin/apxs –with-xml –enable-bcmath –enable-calendar
–enable-ftp –enable-magic-quotes –with-mysql –with-pear –enable-sockets –enable-track-vars
–enable-versioning –with-zlib
-at the end, add the following (assuming mcrypt is actually found in /usr/local/bin/mcrypt):
–with-mcrypt=/usr/local/bin/mcrypt
-save the text file.
6) Go into your php source directory
: /home/cpapachebuild/buildapache/php-4.3.1/
-type: make clean
-type: rm config.cache (yes, remove that file)
-issue your command you saved in the text file. Something like this:
./configure –with-apxs=/usr/local/apache/bin/apxs –with-xml –enable-bcmath –enable-calendar
–enable-ftp –enable-magic-quotes –with-mysql –with-pear –enable-sockets –enable-track-vars
–enable-versioning –with-zlib –with-mcrypt=/usr/local/bin/mcrypt
-when that is done, type: make
-when that is done, type: make test (most tests will fail… about 50%-60% or so)
-when that is done, type make install
or
enable support for php. requires php-mcrypt and php-mhash packages:
yum install php-mhash*
7) Restart Apache
-issue the command: service httpd restart
-go back to your phpinfo.php page and check to see that –with-mcrypt now shows up in the “Configure Command”
Question:
I am trying to have mcrypt support in php. I installed libmcrypt and
mhash using yum. They installed okay, but they weren’t added to
phpinfo(), so they do not work.
Reading mcrypt info it says I need to recompile php.
Answer: It is working!
While I was requiring to recompile php according to the information on the mcrypt package to enable mcrypt support. I found an alternative.
There are 2 solutions to this problem:
A) This is the painless way to do it.
After a lot of research, as I couldn’t find answers on forums and other
places. I found on sourceforge.net they released some rpm packages to
integrate mcrypt and mhash with php.
First we need to install mcrypt and mhash as follows:
1) Install mcrypt & mhash
yum install mhash*
answer y to the question if matched your system (it should).
If it comes out
Parsing package install arguments
No package mcrypt available.
Nothing to do
Manually install from the source after compiling as indicated from the start or the post.
2) enable support for php. requires php-mcrypt and php-mhash packages:
yum install php-mhash*
If you get an error saying packages not signed (unsigned packages), do the following:
edit /etc/yum.conf
change:
gpgcheck=1 to gpgcheck=0
attempt step 2 again. Once completed change back yum.conf
发表评论
-
编译php5.4及安装后添加扩展
2014-02-25 20:30 12107今天因为研发需要php5.4 没有相应的RPM包,所以只能下 ... -
php程序性能分析工具
2014-02-20 11:40 3196平常开发一些效率要 ... -
ubuntu 安装 gearman
2013-10-24 16:25 6323安装过程为:1. 下载wget http://launch ... -
Nmon工具的使用以及通过nmon_analyse生成分析报表
2013-10-15 17:10 57308在我们监控我们的操作系统的时候如果可以 ... -
正则表达式--匹配不包含某一个字符串的方法
2013-09-27 19:38 1121如下图 (((?!\.htm).)*) 为匹配不包含 .ht ... -
nginx的PATH INFO变量
2013-08-12 16:28 898nginx不带这个参数,需要在nginx的 conf/fas ... -
制作joomla的批量导入文章组件
2012-12-11 15:30 1811近期做SEO,需要对一个joomla做的站点批量导 ... -
提高coreseek的搜索精度
2012-11-19 11:28 6029由于coreseek带的mmseg默认词库只有1w多个字词,搜 ... -
discuzx2.5 分区 SEO设置
2012-09-28 19:42 1341由于DiscuzX2.5后台没有分区的SEO设置,只能自己动手 ... -
PROCEDURE can’t return a result set in the given context
2012-08-29 12:11 3063PROCEDURE db.procedure_name ... -
php连接coreseek
2012-08-29 09:48 4529<?php include_once ... -
优化 PHP 代码建议
2012-08-28 09:40 9361、如果能将类的方法定义成static,就尽量定义成stati ... -
coreseek无法索引中文
2012-08-27 17:28 1524按照官方的指导完成coreseek的安装,并成功创建了索引, ... -
joomla放置任意文章到页面模块
2012-04-11 18:20 1988像企业站点经常会想把手动指定的文章放置到页面侧本栏目 ... -
joomla 注意事项
2012-03-23 17:04 8641. 在模块中字段定义的变量不要使用 $content,因为在 ... -
joomla模板的应用
2012-03-22 15:05 1430在做站时,经常会遇到同属分类级别但使用不同模板的情况。 ... -
php魔术方法: __get() 和 __set()的妙用
2012-03-11 18:01 2929<?php class Post { pr ... -
joomla结构分析 - 页面模块加载
2012-03-11 17:34 0joomla在页面中加载模块的方法是在页面中写 <j ... -
joomla结构分析 - 工厂模式
2012-03-10 17:10 1247joomla中工厂模式的使用: 文件 libraries/j ... -
centos6.2+php5.3.10+apache2.2.2的编译安装
2012-02-29 21:27 0之前都是yum install,是 ...
相关推荐
ruoyi-vue-pro-vben 芋道管理后台,基于 vben 最新版本,最新的 vue3 vite4 ant-design-vue 4.0 typescript 语法进行重构开发,支持 springboot3 springcloud 版本
那些年,与你同分同位次的同学都去了哪里?全国各大学在四川2020-2024年各专业最低录取分数及录取位次数据,高考志愿必备参考数据
yolo系列算法目标检测数据集,包含标签,可以直接训练模型和验证测试,数据集已经划分好,适用yolov5,yolov8,yolov9,yolov7,yolov10,yolo11算法; 包含两种标签格:yolo格式(txt文件)和voc格式(xml文件),分别保存在两个文件夹中; yolo格式:<class> <x_center> <y_center> <width> <height>, 其中: <class> 是目标的类别索引(从0开始)。 <x_center> 和 <y_center> 是目标框中心点的x和y坐标,这些坐标是相对于图像宽度和高度的比例值,范围在0到1之间。 <width> 和 <height> 是目标框的宽度和高度,也是相对于图像宽度和高度的比例值
该项目是一个基于Java语言开发的水果管理系统设计源码,包含53个文件,其中包括30个Java源文件、13个XML配置文件、6个JAR包文件、1个Git忽略文件、1个属性文件以及1个SQL脚本文件。此系统旨在用于期末答辩展示,展示了开发者对Java编程和系统设计的深入理解。
java回顾、知识整理、拾遗、面试_java-review
mysql主从复制用struts2,spring,hibernate框架,搭建在线考试系统。网站支持(1)老师创建题库,创建题目,查看题目对题目进行增删改,发布考试(选择考试难中易比例),批改学生试卷,查看学生成绩。(.zip
一个基于Go语言实现的搜索引擎项目资源
那些年,与你同分同位次的同学都去了哪里?全国各大学在四川2020-2024年各专业最低录取分数及录取位次数据,高考志愿必备参考数据
基于grpc开发的跨语言的交互系统,集成BCS,Brower
那些年,与你同分同位次的同学都去了哪里?全国各大学在四川2020-2024年各专业最低录取分数及录取位次数据,高考志愿必备参考数据
那些年,与你同分同位次的同学都去了哪里?全国各大学在四川2020-2024年各专业最低录取分数及录取位次数据,高考志愿必备参考数据
那些年,与你同分同位次的同学都去了哪里?全国各大学在四川2020-2024年各专业最低录取分数及录取位次数据,高考志愿必备参考数据
基于go语言,使用gocv和socket实现摄像头视频传输项
apache-seatunnel-web-1.0.2
内容概要:本篇文章主要介绍了如何在VMware虚拟化平台上搭建并配置QNX Neutrino实时操作系统的步骤方法。文章首先给出了获取必要的安装文件来源,然后逐步指导用户如何完成QNX在虚拟机中的安装过程以及相关网络参数配置,包括选择适当的网络模式来实现宿主机器与QNX虚拟机之间的通信,具体为设置NAT模式或者桥接模式下的网络参数,如指定静态或动态获取IP地址的方法。 适用人群:对嵌入式开发感兴趣的技术人士,尤其是需要在Linux环境下开展工作的程序员和系统工程师。 使用场景及目标:通过详细的操作指南帮助初学者快速掌握在Windows或Linux主机上利用虚拟机搭建QNX Real-Time Operating System开发环境的基础技能,能够实现在该环境中运行简单的C/C++应用程序。 其他说明:本文不仅适用于QNX初学者作为入门引导资料,也为经验丰富的开发者提供了有关于特定环境配置的重要参考。由于涉及到的具体细节比较多,读者最好边操作边对照文章内容进行练习。同时要注意保持最新版本的虚拟化平台客户端和服务端程序以确保兼容性和稳定性。
stm32中dma结合ad的使用
yolo系列算法目标检测数据集,包含标签,可以直接训练模型和验证测试,数据集已经划分好,适用yolov5,yolov8,yolov9,yolov7,yolov10,yolo11算法; 包含两种标签格:yolo格式(txt文件)和voc格式(xml文件),分别保存在两个文件夹中; yolo格式:<class> <x_center> <y_center> <width> <height>, 其中: <class> 是目标的类别索引(从0开始)。 <x_center> 和 <y_center> 是目标框中心点的x和y坐标,这些坐标是相对于图像宽度和高度的比例值,范围在0到1之间。 <width> 和 <height> 是目标框的宽度和高度,也是相对于图像宽度和高度的比例值
低全球变暖潜能值 (GWP) 制冷剂.docx
那些年,与你同分同位次的同学都去了哪里?全国各大学在四川2020-2024年各专业最低录取分数及录取位次数据,高考志愿必备参考数据
ubuntu