尝试获取 mcrypt 时发生 PHP 编译错误,Mac OSx 10.6
我正在努力在新的 Mac Mini 上设置 LAMP 堆栈以用作 Web 服务器。我使用的是捆绑的 PHP 版本 5.3.3 和 Apache 2.2.15。
我已经让 phpMyAdmin 工作并连接到我的 mysql 安装,但我收到“无法加载 mcrypt 扩展。我完成了本教程 - http://michaelgracie.com/2009/09/23/plugging-mcrypt-into-php-on- mac-os-x-snow-leopard-10.6.1/ - 安装 mcrypt 并且 phpinfo() 显示 mcrypt 已按照最后的屏幕截图安装,
但我仍然收到 mcrypt 扩展未加载警告。我怎样才能摆脱这个服务器最终将用于生产,我希望它是安全的。
I and working on setting up a LAMP stack on a new Mac Mini to use as a web server. I am using the bundled PHP version 5.3.3 and Apache 2.2.15.
I have gotten phpMyAdmin working and connect to my mysql installation but I get a "Cannot load mcrypt extension. I did this tutorial - http://michaelgracie.com/2009/09/23/plugging-mcrypt-into-php-on-mac-os-x-snow-leopard-10.6.1/ - to get mcrypt installed and phpinfo() shows mcrypt is installed as per the screenshot at the end.
But im still getting the mcrypt extension not loaded warning. How can I get rid of this. This server is eventually going to be used for production and I would like it to be secure.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将教程中的extension=mcrypt.so 替换为extension=the/full/path/to/mcrypt.so 似乎可以清除它。
Replace extension=mcrypt.so from the tutorial with extension=the/full/path/to/mcrypt.so seems to clear it up.
您可能已将 mcrypt 构建为 i386。使用 file 命令(
file mcrypt.so
)检查这一点。您的新 Mac mini 是 64 位的。尝试将 mcrypt 构建为 x86_64。您可以尝试破解 Makefile 或设置
ARCHFLAGS="-arch x86_64"
。You may have built mcrypt as i386. Check this with the file command (
file mcrypt.so
).Your new Mac mini is 64-bit. Try building mcrypt as x86_64. You could try hacking the Makefile or setting
ARCHFLAGS="-arch x86_64"
.