Curl would not work on windows Command Prompt but it working fine on the browser (localhost)
Error:
C:\wamp\www\site>C:\wamp\bin\php\php5.3.0\php.exe -f index.php
PHP Fatal error: Call to undefined function curl_init() in C:\wamp\www\site\index.php on line 111
Fatal error: Call to undefined function curl_init() in C:\wamp\www\site\index.php on line 111
Yes PHP Curl is enabled, like I said it work fine on the browser.
We might have come across errors like “curl: command not found” while working in the terminal. This type of error comes due to only one reason: the relevant package is not installed. Curl is a very popular data transfer command-line utility used for downloading and uploading data from or to the server.
Invoke curl.exe from a command window (in Windows, click Start > Run and then enter "cmd" in the Run dialog box). You can enter curl --help to see a list of cURL commands.
Install cURL To check whether it is installed on your system or not, type curl in your terminal window and press enter. If it isn't installed, it will show a “command not found” error. Use the commands below to install it on your system.
Open a command prompt by clicking the Start button and typing cmd. Type curl -V .
Run php -r "echo php_ini_loaded_file();" in the command line to see which ini file is being loaded.
Then remove the ; before extension=php_curl.dll around line 656
Restart apache
For this to work, make sure php is set as global variable, if not got to D:\wamp\bin\php\php5.2.5 (path can change on ur computer) from the command line & run the code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With