I am using php7.0. I have installed curl in my system. I have this file:
/etc/php/7.0/cli/conf.d/20-curl.ini
I also have this file:
/etc/php/7.0/mods-available/curl.ini
Also, when I run this php -i | grep curl
I get:
/etc/php/7.0/cli/conf.d/20-curl.ini,
curl
cat 20-curl.ini gives :
; configuration for php curl module
; priority=20
extension=curl.so
I even restarted my apache many times using sudo service apache2 restart
However, when I do var_dump(curl_init())
it says Call to undefined function curl_init()
.
I looked at various solution on stackOverflow, but can't find a solution that solves my problem. I am looking for the solution for hours. Can't understand how to make it work. I even tried sudo apt-get upgrade
and upgraded my server.
I found in some solutions to uncomment ;extension=php-curl.dll
but that is also not working. I am really stuck now. Need Help.