{"id":195,"date":"2020-08-14T16:50:43","date_gmt":"2020-08-14T08:50:43","guid":{"rendered":"http:\/\/www.cgh0610.cn\/?p=195"},"modified":"2020-08-14T16:50:43","modified_gmt":"2020-08-14T08:50:43","slug":"php-7-2-%e5%ae%89%e8%a3%85-mcrypt-%e6%89%a9%e5%b1%95-mcrypt-%e6%89%a9%e5%b1%95%e4%bb%8e-php-7-1-0-%e5%bc%80%e5%a7%8b%e5%ba%9f%e5%bc%83%ef%bc%9b%e8%87%aa-php-7-2-0-%e8%b5%b7%ef%bc%8c%e4%bc%9a%e7%a7%bb","status":"publish","type":"post","link":"https:\/\/www.cgh0610.cn\/?p=195","title":{"rendered":"php 7.2 \u5b89\u88c5 mcrypt \u6269\u5c55: mcrypt \u6269\u5c55\u4ece php 7.1.0 \u5f00\u59cb\u5e9f\u5f03\uff1b\u81ea php 7.2.0 \u8d77\uff0c\u4f1a\u79fb\u5230 pecl"},"content":{"rendered":"<p>\u5347\u7ea7 php 7.2 \u540e\uff0c\u4f7f\u7528\u5fae\u4fe1\u63d0\u4f9b\u7684\u52a0\u89e3\u5bc6\u4ee3\u7801\u65f6\uff0c\u63d0\u793a call to undefined function mcrypt_module_open() \uff1b\u5927\u8111\u75af\u72c2\u8fd0\u8f6c1\u79d2\u949f\u540e\uff0c\u5f97\u51fa\u7ed3\u8bba\uff1aphp 7.2\u7684\u6269\u5c55\u6709\u53d8\u52a8\uff1b\u67e5\u9605\u76f8\u5173\u8d44\u6599\u77e5\u6653\uff0cmcrypt \u6269\u5c55\u4ece php 7.1.0 \u5f00\u59cb\u5e9f\u5f03\uff1b\u81ea php 7.2.0 \u8d77\uff0c\u4f1a\u79fb\u5230 pecl\u3002\u8fd8\u597d\uff0c\u5b89\u88c5\u8fc7\u7a0b\u4e0d\u590d\u6742\u3002<\/p>\n<p>\u73af\u5883\uff1acentos 7<\/p>\n<p>1.yum \u5b89\u88c5\u4f9d\u8d56\u5305\uff1a<\/p>\n<p>yum install libmcrypt libmcrypt-devel mcrypt mhash<\/p>\n<p>2.\u5728 php \u5b98\u7f51\u4e0b\u8f7d mcrypt \u5305\uff0cphp \u6269\u5c55\u5b98\u7f51<\/p>\n<p># wget  http:\/\/pecl.php.net\/get\/mcrypt-1.0.1.tgz<\/p>\n<p># tar xf mcrypt-1.0.1.tgz<\/p>\n<p># cd mcrypt-1.0.1<\/p>\n<p>3.\u7f16\u8bd1\u5b89\u88c5 mcrypt<\/p>\n<p>\u8fdb\u5165\u5230php\u5b89\u88c5\u76ee\u5f55<\/p>\n<p># \/usr\/local\/php\/bin\/phpize<\/p>\n<p># .\/configure &#8211;with-php-config=\/usr\/local\/php\/bin\/php-config  &amp;&amp; make &amp;&amp; make install<\/p>\n<p>4.\u5728php.ini\u52a0\u4e0a\u6269\u5c55\u5373\u53ef<\/p>\n<p>extension=mcrypt.so<\/p>\n<p>5.\u91cd\u542f php-fpm<\/p>\n<p>\/etc\/init.d\/php-fpm restart #\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u4fee\u6539\uff0c\u4f60\u4e5f\u53ef\u80fd\u662f\/usr\/local\/php\/sbin\/php-fpm<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5347\u7ea7 php 7.2 \u540e\uff0c\u4f7f\u7528\u5fae\u4fe1\u63d0\u4f9b\u7684\u52a0\u89e3\u5bc6\u4ee3\u7801\u65f6\uff0c\u63d0\u793a call to undefined functio &hellip; <a href=\"https:\/\/www.cgh0610.cn\/?p=195\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">php 7.2 \u5b89\u88c5 mcrypt \u6269\u5c55: mcrypt \u6269\u5c55\u4ece php 7.1.0 \u5f00\u59cb\u5e9f\u5f03\uff1b\u81ea php 7.2.0 \u8d77\uff0c\u4f1a\u79fb\u5230 pecl<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"aside","meta":[],"categories":[38,12,3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=\/wp\/v2\/posts\/195"}],"collection":[{"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=195"}],"version-history":[{"count":1,"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=\/wp\/v2\/posts\/195\/revisions"}],"predecessor-version":[{"id":196,"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=\/wp\/v2\/posts\/195\/revisions\/196"}],"wp:attachment":[{"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}