How do I enable curl for php How do I enable curl for php nginx nginx

How do I enable curl for php


Check whether you have php5-curl installed

dpkg -l | grep 'php5-curl'

If isn't installed,

apt-get install php5-curl

Ensure the path in extension_dir exists, and contains curl.so, if not, change to the correct path.

php -i | grep extension_dir

Ensure the /etc/php5/mods-available/curl.ini exists and has the curl.so loaded

; configuration for php CURL module; priority=20extension=curl.so

If everything is correct, restart PHP-FPM

/etc/init.d/php5-fpm restart


To enable curl on Windows uncomment

;extension=php_curl.dll;toextension=php_curl.dll