I want to call curl_init()
on console Command laravel
but I'm getting error "Call to undefined function curl_init()
" ?
but when I call curl_init()
from Controller laravel
is working fine.
Any Ideas?
I want to call curl_init()
on console Command laravel
but I'm getting error "Call to undefined function curl_init()
" ?
but when I call curl_init()
from Controller laravel
is working fine.
Any Ideas?
My guess is that you are using two different PHP installations in command line and on your local web server.
To verify that, check both versions: run php -v
in command line to see what version is running in command line, and load a web page on your browser with this content for your webserver PHP version: <?php phpinfo();
If that is the case, activate "php_curl" extension on your command line installation.
This error appears when curl extension is not being installed or activated. Run php -m command in your terminal or cmd to check whether curl is listed or not.