Reputation: 67
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
Upvotes: 4
Views: 6640
Reputation: 67
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
Upvotes: 1
Reputation: 10163
According this article you should to do next:
Login as root and run
yum install curl
Installing php-curl
yum install php-curl
Upvotes: 3