如何在 Mac OS X 上使用 Lighttpd 将 PHP 5.3 (FastCGI) 链接到 cURL?
今天早上,我使用 MacPorts 安装了 lighttpd
、php5 +fastcgi
和 php5-curl
。我已经能够让前两个工作正常,但我似乎无法让 PHP 查看已安装的 cURL 扩展。我没有更改 cURL 的安装路径 - 它现在位于 /opt/local/lib/php/extensions/no-debug-non-zts-20090626/curl.so
。
我还在我的 PHP 文件中添加了一行:
extension=curl.so
我已经尝试过这一行以及使用绝对路径的一行,在尝试之间重新启动服务器,但是当我运行测试时,没有任何东西使 cURL 显示为扩展名带有 phpinfo()
的页面。
我在这里错过了一步吗?我是否需要使用 cURL 选项重新配置和重新编译 PHP?
I installed lighttpd
, php5 +fastcgi
, and php5-curl
earlier this morning using MacPorts. I have been able to get the former two working fine, but I can't seem to get PHP to see the installed cURL extension. I did not change the install path for cURL - it is now at /opt/local/lib/php/extensions/no-debug-non-zts-20090626/curl.so
.
I've added a line into my PHP file as well:
extension=curl.so
I've tried this line as well as one using the absolute path, restarting the server in between tries, but nothing has made cURL show up as an extension when I run a test page with phpinfo()
.
Am I missing a step here? Do I need to reconfigure and recompile PHP with an option for cURL, maybe?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您查看Lighttpd的错误信息了吗?我猜想加载curl.so可能有问题,它就会在那里。
Did you view the error message of Lighttpd? I guess there might be a problem with loading the curl.so, and it will be there.