How do I enable cURL in PHP?
Since you’re using XAMPP, uncomment the line
1 |
<span class="pun">;</span><span class="pln">extension</span><span class="pun">=</span><span class="pln">php_curl</span><span class="pun">.</span><span class="pln">dll</span> |
in xampp\apache\bin\php.ini
, and then restart the Apache service.
NB: In newer XAMPP versions, PHP has moved to root xampp folder xampp\php\php.ini
1 2 |
<span class="pln">apt</span><span class="pun">-</span><span class="kwd">get</span><span class="pln"> install php5</span><span class="pun">-</span><span class="pln">curl </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">init</span><span class="pun">.</span><span class="pln">d</span><span class="pun">/</span><span class="pln">apache2 restart</span> |
(php4-curl if it’s php4)