Web Demo PHP error: Call to undefined function curl_init() in functions.php on line 38

+4 votes

Web Demo doesn't work for me. I get a PHP error when I load the "?chain=default" page (just after clicking the "Default" link on the front page).

Fatal error: Uncaught Error: Call to undefined function curl_init() in C:\Users\Morten.Helles.EVERYMATRIX\MultiChain\web-demo\functions.php:38 Stack trace: #0 C:\Users\Morten.Helles.EVERYMATRIX\MultiChain\web-demo\functions.php(79): json_rpc_send('192.168.1.109', '10001', 'multichainrpc', 'GcXSQwDQZ7qSqHE...', 'getinfo', Array) #1 C:\Users\Morten.Helles.EVERYMATRIX\MultiChain\web-demo\functions.php(139): multichain('getinfo') #2 C:\Users\Morten.Helles.EVERYMATRIX\MultiChain\web-demo\page-default.php(11): multichain_getinfo() #3 C:\Users\Morten.Helles.EVERYMATRIX\MultiChain\web-demo\index.php(74): require_once('C:\\Users\\Morten...') #4 {main} thrown in C:\Users\Morten.Helles.EVERYMATRIX\MultiChain\web-demo\functions.php on line 38

I am using the built-in web server of PHP 7.1.0. I get the same error with PHP 5.2.29.

asked Dec 12, 2016 by Morten

1 Answer

0 votes
The web demo requires the PHP curl extension to be installed – this should be easy to do, and we've added it to the README now.
answered Dec 12, 2016 by MultiChain
I installed curl, but I keep getting this error. I tried restarting, cleaning cache, restarting IIS website, but still getting this error. Any other issues that might cause it?
If the curl_init() function is not defined, that is definitely because curl is not installed in PHP properly. It's not just curl, but also the curl extension for PHP that you need.
...