4

i'm trying to install curl to my centos OS by yum when I check

curl --version

it shows

curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.44 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

but when I run php -m still doesn't gets curl lib.

Or

Call to undefined function curl_init()

I had change file php.ini by drop ; at extension=php_curl.dll and restart service httpd but doesn't seems to work. Can someone tell me

Deepak Rai
  • 2,163
  • 3
  • 21
  • 36
VendettaV
  • 67
  • 2
  • 7

2 Answers2

3

According this article you should to do next:

Login as root and run

yum install curl

Installing php-curl

yum install php-curl
Slava Rozhnev
  • 9,510
  • 6
  • 23
  • 39
1

Installed curl and php-curl, but not work? The reason may be:

The "curl.ini" file in /etc/php.d/ may be disabled (renamed to curl.ini.disabled).

Do the following:

ls /etc/php.d/
mv /etc/php.d/curl.ini.disabled /etc/php.d/curl.ini 
systemctl restart httpd.service
Andrews32
  • 47
  • 1
  • 5