8

I'm using NGINX with PHP-FPM on Debian Wheezy via DotDeb repo.

This is the only curl reference in my php.ini file and I'm not sure what I need to do. Any help is appreciated (it's already installed)

[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
;curl.cainfo =

; Local Variables:
; tab-width: 4
; End:
2
  • I believe you have to add (or uncomment) line in your php.ini: extension=php_curl.so and then restart php-fpm. Commented Apr 23, 2014 at 2:00
  • I tried this but it said Unable to load module ---- no such file or directory Commented Apr 23, 2014 at 2:41

2 Answers 2

12

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=20
extension=curl.so

If everything is correct, restart PHP-FPM

/etc/init.d/php5-fpm restart
Sign up to request clarification or add additional context in comments.

2 Comments

Hi, curl is already installed (as mentioned in the question) -- I just don't know how to enable it in php.ini.
Go to phpinfo, check whether the path listed in extension_dir exists or not. And in /etc/php5/mods-available/curl.ini, it should be extension=curl.so, or the *curl.so that you find in extension_dir.
-2

To enable curl on Windows uncomment

;extension=php_curl.dll
;to
extension=php_curl.dll

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.