mac1011 php error Use of undefined constant MCRYPT_RIJNDAEL_128

WBOY
Release: 2016-07-29 09:04:41
Original
1658 people have browsed it

The reason for the error is that the mcrypt extension of php is not installed, but the constants of the encryption methods defined in the extension are used. Solution: Install the mcrypt extension

Specific steps:

1. Open the command line to install mcrypt: brew install mcrypt

        2. Install the php-mcrypt extension: brew install php55-mcrypt (install your own version of php)

                                                                                                                                                                                                                           . Check if the extension is installed

php -m | grep mcrypt

php -i | grep mcrypt

<br>

<img src="http://image.codes51.com/Article/image/20160129/20160129115805_1368.png" alt="mac1011 php报错 Use of undefined constant MCRYPT_RIJNDAEL_128">​ 4. Copy the mcrypt configuration to the directory of the php scan configuration I The default-Will-config-free-scan-dir =/library/server/web/config/php 'can be found in the configure commit options in PHPINFO.

            sudo mkdir -p /Library/Server/Web/Config/php

                                                                                                                                                                  . ext-mcrypt.ini

or

sudo ln -s /usr/local/etc/php/5.5/conf.d/ext-mcrypt.ini /Library/Server/Web/Config/php/ext-mcrypt. ini

Finally:

sudo apachectl restart


You can also use another method to install:

http://jingyan.baidu.com/article/e3c78d644cf1ed3c4c85f5a8.html

The above introduces the mac1011 php error Use of undefined constant MCRYPT_RIJNDAEL_128, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials. <br>

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