Home > Backend Development > PHP Tutorial > centos65 compile mcrypt

centos65 compile mcrypt

WBOY
Release: 2016-07-29 09:04:14
Original
890 people have browsed it

Download php source code to compile

<code>cd php/ext/mcrypt
phpize
<span>error</span>: 
    No <span>package</span> libmcrypt available.
    No <span>package</span> libmcrypt-devel available.
    No <span>package</span> mcrypt available.
    No <span>package</span> mhash available.

yum  install epel-release  //扩展包更新包
yum  update //更新yum源
yum install libmcrypt libmcrypt-devel mcrypt mhash  就ok了

./configure
<span>error</span>
    /Downloads/php-<span>5.5</span><span>.31</span>/ext/mcrypt/mcrypt.c:<span>283</span>: 错误:‘PHP_FE_END’未声明(不在函数内)</code>
Copy after login

Solution

<code><span>sed</span> -i <span>'s|PHP_FE_END|{NULL,NULL,NULL}|'</span> ./<span>*.c</span>sed -i <span>'s|ZEND_MOD_END|{NULL,NULL,NULL}|'</span> ./<span>*.c</span></code>
Copy after login

Next step:

<code>./configure
<span>make</span><span>make</span> test <span>// 可以省略</span>
sudo <span>make</span> install</code>
Copy after login

Next step:
After make install, we will see mcrypt.so in /usr/lib64/php/modules/

<code> cd /etc/php<span>.d</span>/
 sudo vi mcrypt<span>.ini</span>
   extension=mcrypt<span>.so</span></code>
Copy after login

Restart apache to see the effect

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces centos65 compilation of mcrypt, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template