如何在Mac Os X Lion 10.7.4上启用Php Mcrypt [英] How To Enable Php Mcrypt on Mac Os X Lion 10.7.4
问题描述
我已经尝试在OS X中启用mcrypt了两天.我阅读了许多文档,但无法完成.也许是因为我是OS X环境中的新手.
I have been trying to enable mcrypt for two days in OS X. I read lots of document but I could not accomplish. Maybe it is because I am new in OS X environment.
到目前为止,我所做的简要总结是
The brief summary what I have done so far is;
我安装了Xcode并安装了命令行工具.
I installed Xcode and installed Command Line Tools.
下载并解压缩了libmcrypt-2.5.8和php-5.3.15.
Downloaded and extracted libmcrypt-2.5.8 and php-5.3.15.
cd libmcrypt-2.5.8
./configure && make && sudo make install
它的输出是
Libraries have been installed in:
/usr/local/lib
和其他一些日志
make[2]: Nothing to be done for `install-exec-am'.
下一步是;
cd php-5.3.15/ext/mcrypt
./configure && make && sudo make install
此输出为
Installing shared extensions:
/usr/lib/php/extensions/no-debug-non-zts-20090626/
根据我阅读的文档,这意味着安装成功.毕竟,我打开了/etc/php.ini
并写了extension=mcrypt.so
.我用sudo apachectl restart重新启动了apache.但是什么也没发生. Mcrypt未出现在php -m
中.
According to documents that I read, this means the installation is successful. After all these I opened /etc/php.ini
and wrote extension=mcrypt.so
. I restarted apache with sudo apachectl restart. But nothing happened. Mcrypt did not appear in php -m
.
我还尝试使用sudo port install php-mcrypt +universal
安装mcrypt,但这也没有用.
I also tried to install mcrypt with sudo port install php-mcrypt +universal
but also this did not worked.
我看到了另一个与此问题相关的主题,有一个回答说用mcrypt.so
的完整路径更改extension=mcrypt.so
.我尝试了,那对我也不起作用.
I saw another topic which is related to this problem and there was an answer which says that changing extension=mcrypt.so
with full path of mcrypt.so
. I tried and that is also not worked for me.
推荐答案
I found this walkthrough useful, http://www.coolestguyplanettech.com/how-to-install-mcrypt-for-php-on-mac-osx-lion-10-7-development-server/
这篇关于如何在Mac Os X Lion 10.7.4上启用Php Mcrypt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!