Dimitar
Dimitar

Reputation: 1928

Curl is not working after install, why?

I'm using Ubuntu 16.04 server and i have ran

sudo apt-get install php-curl

and get output:

php-curl is already the newest version

when i run:

curl -V

i get:

curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10
zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets 

in the phpinfo() page i dont see curl enabled/installed and when i run any curl function i got error:

Fatal error: Uncaught Error: Call to undefined function curl_version() in ...

yesterday was working fine. i updated the php and now its not working any more...

Upvotes: 2

Views: 2340

Answers (2)

Dimitar
Dimitar

Reputation: 1928

the solution in my case was to install curl using:

sudo apt-get install php7.0-curl

thanks to @casimir-et-hippolyte

Upvotes: 2

NID
NID

Reputation: 3294

In order to use curl u should enable it first.Find your php.ini file and uncomment this line.

;extension=php_curl.dll

Don't forget to restart the apache..

 /opt/lampp/lampp service apache2 restart

Upvotes: 2

Related Questions