Ricardo Santos
Ricardo Santos

Reputation: 91

NGINX - CURL extension installed but the system says it's missing

I'm trying to update a Laravel project with composer, but the systems says:

Problem 1

- Installation request for netshell/paypal dev-master -> satisfiable by netshell/paypal[dev-master].
- netshell/paypal dev-master requires ext-curl * -> the requested PHP extension curl is missing from your system.

To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/5.6/cli/php.ini
- /etc/php/5.6/cli/conf.d/10-mysqlnd.ini
- /etc/php/5.6/cli/conf.d/10-opcache.ini
- /etc/php/5.6/cli/conf.d/10-pdo.ini
- /etc/php/5.6/cli/conf.d/15-xml.ini
- /etc/php/5.6/cli/conf.d/20-calendar.ini
- /etc/php/5.6/cli/conf.d/20-ctype.ini
- /etc/php/5.6/cli/conf.d/20-dom.ini
- /etc/php/5.6/cli/conf.d/20-exif.ini
- /etc/php/5.6/cli/conf.d/20-fileinfo.ini
- /etc/php/5.6/cli/conf.d/20-ftp.ini
- /etc/php/5.6/cli/conf.d/20-gettext.ini
- /etc/php/5.6/cli/conf.d/20-iconv.ini
- /etc/php/5.6/cli/conf.d/20-json.ini
- /etc/php/5.6/cli/conf.d/20-mbstring.ini
- /etc/php/5.6/cli/conf.d/20-mcrypt.ini
- /etc/php/5.6/cli/conf.d/20-mysql.ini
- /etc/php/5.6/cli/conf.d/20-mysqli.ini
- /etc/php/5.6/cli/conf.d/20-pdo_mysql.ini
- /etc/php/5.6/cli/conf.d/20-phar.ini
- /etc/php/5.6/cli/conf.d/20-posix.ini
- /etc/php/5.6/cli/conf.d/20-readline.ini
- /etc/php/5.6/cli/conf.d/20-shmop.ini
- /etc/php/5.6/cli/conf.d/20-simplexml.ini
- /etc/php/5.6/cli/conf.d/20-sockets.ini
- /etc/php/5.6/cli/conf.d/20-sysvmsg.ini
- /etc/php/5.6/cli/conf.d/20-sysvsem.ini
- /etc/php/5.6/cli/conf.d/20-sysvshm.ini
- /etc/php/5.6/cli/conf.d/20-tokenizer.ini
- /etc/php/5.6/cli/conf.d/20-wddx.ini
- /etc/php/5.6/cli/conf.d/20-xmlreader.ini
- /etc/php/5.6/cli/conf.d/20-xmlwriter.ini
- /etc/php/5.6/cli/conf.d/20-xsl.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

The machine is: Ubuntu 14.04 Nginx PHP 5.6

I already did a lot of steps like:

And still not working...

I also have the curl.ini file with:

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

And my phpinfo says that curl is enabled:

enter image description here

What can i do more ?

Upvotes: 0

Views: 4529

Answers (1)

yivi
yivi

Reputation: 47434

composer and nginx use different PHP interpreters. You have php-curl enabled for php-fpm, but not for php-cli.

You can determine the actual configuration files used by php-cli by running php --ini (and you'll probably see that curl.ini is not in there)

Enable it with something like:

sudo ln -s /etc/php/5.6/mods-available/curl.ini /etc/php/5.6/cli/conf.d/20-curl.ini

Attention: the first parameter should be the actual location for your curl.ini file. So it could be also

sudo ln -s /etc/php5/mods-available/curl.ini /etc/php/5.6/cli/conf.d/20-curl.ini

If your run php --info | grep curl -C 3 you'll see if curl is actually enabled for your php-cli installation.

Upvotes: 2

Related Questions