如何在 CentOS 中为 PHP 5 添加 curl 支持

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2332133/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 06:04:25  来源:igfitidea点击:

How to add curl support to PHP 5 in CentOS

phpcurlcentos

提问by santhosh

How to add curl support to PHP 5 in CentOS ?

如何在 CentOS 中为 PHP 5 添加 curl 支持?

After installing curl and curl-devel, what are the things that I need to do to setup curl in PHP 5

安装 curl 和 curl-devel 后,我需要做什么才能在 PHP 5 中设置 curl

回答by rubayeet

Had the same problem. Installing php-common did the trick for me

有同样的问题。安装 php-common 对我有用

yum install php-common

You can also specifically install the php-curl extension

也可以专门安装php-curl扩展

yum install php-curl

回答by wimvds

Curl support should already be built into PHP for CentOS 5 (according to http://www.centos.org/modules/newbb/viewtopic.php?topic_id=17226).

对于 CentOS 5,Curl 支持应该已经内置到 PHP 中(根据http://www.centos.org/modules/newbb/viewtopic.php?topic_id=17226)。

Did you restart apache after installing curl? What error messages do you get?

安装curl后你重启apache了吗?你得到什么错误信息?

BTW This question seems to belong on serverfault...

顺便说一句,这个问题似乎属于服务器故障......