mac10.11 php报错 Use of undefined constant MCRYPT_RIJNDAEL_128
来源:互联网 发布:mysql group by having 编辑:程序博客网 时间:2024/05/29 10:23
错误的原因是没有安装php的mcrypt扩展,却用到了扩展里定义的加密方式的常量
解决办法:安装mcrypt扩展
具体步骤:
1、打开命令行 安装mcrypt :brew install mcrypt
2、安装php-mcrypt扩展: brew install php55-mcrypt(安装自己的php对应的版本)
中间如果遇到错误,静下心来,认真读一下英文代码,都能解决
3、看一下扩展是否已经装好
php -m | grep mcrypt
php -i | grep mcrypt
4、复制mcrypt的配置到php扫描配置的目录
默认为--with-config-file-scan-dir=/Library/Server/Web/Config/php' 可以在phpinfo中Configure Command选项中找到
接下来把mcrypt的ini文件复制进去即可:
sudo mkdir -p /Library/Server/Web/Config/php
sudo cp /usr/local/etc/php/5.5/conf.d/ext-mcrypt.ini /Library/Server/Web/Config/php/ext-mcrypt.ini
或者
sudo ln -s /usr/local/etc/php/5.5/conf.d/ext-mcrypt.ini /Library/Server/Web/Config/php/ext-mcrypt.ini
最后:sudo apachectl restart即可
你也可以使用另一种方法安装:
http://jingyan.baidu.com/article/e3c78d644cf1ed3c4c85f5a8.html
- mac10.11 php报错 Use of undefined constant MCRYPT_RIJNDAEL_128
- Notice: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in
- 关于解决PHP报错“Notice:Use of undefined constant error” 解决办法
- PHP Notice: Use of undefined constant
- PHP “Notice: Use of undefined constant ”
- PHP Notice: Use of undefined constant variable
- Use of undefined constant OCI_COMMIT_ON_SUCCESS
- Notice: Use of undefined constant
- Use of undefined constant FTP_BINARY
- Use of undefined constant ws1
- PHP 出现Notice: Use of undefined constant 的解决方案
- PHP 出现Notice: Use of undefined constant 的解决方案
- Notice: Use of undefined constant 错误 调整 php.ini文件
- PHP 出现Notice: Use of undefined constant 的解决方案
- 修改php.ini屏蔽警告Notice: Use of undefined constant ;
- PHP运行出现Notice : Use of undefined constant 的解决办法
- PHP运行出现Notice : Use of undefined constant 的解决办法
- PHP运行出现Notice : Use of undefined constant 的解决办法
- 12. redis 高级:redis 常用配置
- Long Value输出方法
- 自定义View相关知识记录
- 【团队分享】刀锋铁骑:常见Android Native崩溃及错误原因
- 从零学习Swift<6>
- mac10.11 php报错 Use of undefined constant MCRYPT_RIJNDAEL_128
- 使用Android Studio来为Cocos2dx-lua项目打包
- 公司里的人际界线——北漂18年(41)
- 当一个从XIB创建的视图的子控制器在UI上不显示要想到视图控制器的autoresizingMask属性
- 13. redis 高级:Java客户端
- Ubuntu的vps搭建tomcat+mysql等环境
- ROS By Example_hydro_volume1_CN_5
- 理解Fragment生命周期
- Android开发之fragment的生命周期与使用