I am running PHP code with the following code invovled:
$ch = curl_init();
When I get to this line, the following error is returned:
Fatal error: Call to undefined function curl_init() in C:\xampp\htdocs\myfiles\API\IPVIKING_API.php on line 79
Now I’ve found all the answers talking about enabling the curl extension in the php.ini file, and I’ve done that, following this question here: How to enable curl in xampp?.
My problem is I do not have these 3 files:
C:\Program Files\xampp\apache\bin\php.ini
C:\Program Files\xampp\php\php.ini
C:\Program Files\xampp\php\php4\php.ini
I instead have 2 files called
C:\Program Files\xampp\php\php.ini-development
C:\Program Files\xampp\php\php.ini-production
I’ve uncommented the
;extension=php_curl.dll
line in both of them, restarted both my browser and xampp, yet it still gives me the same error. Suggestions?
Make an
there you can see which php.ini is loaded. In this file you uncomment the the extension line.
When there is no php.ini in this path which is in the phpinfo this should be xampp/php/php.ini then rename one of the two files
to