如何在 Mac OS X 上使用 Lighttpd 将 PHP 5.3 (FastCGI) 链接到 cURL?

发布于 2024-09-07 03:39:46 字数 469 浏览 0 评论 0原文

今天早上,我使用 MacPorts 安装了 lighttpdphp5 +fastcgiphp5-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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

随遇而安 2024-09-14 03:39:46

您查看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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文