Why cURL is not loaded?

Ubuntu 16.04, php7

From phpinfo:
PHP Version 7.0.8-1+deb.sury.org~xenial+2
Server API Built-in HTTP server
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php/7.0/cli
Loaded Configuration File /etc/php/7.0/cli/php.ini
Scan this dir for additional .ini files /etc/php/7.0/cli/conf.d


Have installed curl with the command sudo apt-get install php7.0-curl
Also I tried sudo apt-get install php-curl and sudo apt-get install curl

In the terminal I enter the command php --ini
Configuration File (php.ini) Path: /etc/php/7.0/cli
Loaded Configuration File: /etc/php/7.0/cli/php.ini
Scan for additional .ini files in: /etc/php/7.0/cli/conf.d
Additional .ini files parsed: /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
/etc/php/7.0/cli/conf.d/10-opcache.ini
/etc/php/7.0/cli/conf.d/10-pdo.ini
/etc/php/7.0/cli/conf.d/15-xml.ini
/etc/php/7.0/cli/conf.d/20-calendar.ini
/etc/php/7.0/cli/conf.d/20-ctype.ini
/etc/php/7.0/cli/conf.d/20-curl.ini
/etc/php/7.0/cli/conf.d/20-dom.ini
/etc/php/7.0/cli/conf.d/20-exif.ini
/etc/php/7.0/cli/conf.d/20-fileinfo.ini
/etc/php/7.0/cli/conf.d/20-ftp.ini
/etc/php/7.0/cli/conf.d/20-gd.ini
/etc/php/7.0/cli/conf.d/20-gettext.ini
/etc/php/7.0/cli/conf.d/20-iconv.ini
/etc/php/7.0/cli/conf.d/20-json.ini
/etc/php/7.0/cli/conf.d/20-mbstring.ini
/etc/php/7.0/cli/conf.d/20-mcrypt.ini
/etc/php/7.0/cli/conf.d/20-mysqli.ini
/etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
/etc/php/7.0/cli/conf.d/20-phar.ini
/etc/php/7.0/cli/conf.d/20-posix.ini
/etc/php/7.0/cli/conf.d/20-readline.ini
/etc/php/7.0/cli/conf.d/20-shmop.ini
/etc/php/7.0/cli/conf.d/20-simplexml.ini
/etc/php/7.0/cli/conf.d/20-sockets.ini
/etc/php/7.0/cli/conf.d/20-sysvmsg.ini
/etc/php/7.0/cli/conf.d/20-sysvsem.ini
/etc/php/7.0/cli/conf.d/20-sysvshm.ini
/etc/php/7.0/cli/conf.d/20-tokenizer.ini
/etc/php/7.0/cli/conf.d/20-wddx.ini
/etc/php/7.0/cli/conf.d/20-xmlreader.ini
/etc/php/7.0/cli/conf.d/20-xmlwriter.ini
/etc/php/7.0/cli/conf.d/20-xsl.ini


Restart apache and curl still there.
July 8th 19 at 11:19
2 answers
July 8th 19 at 11:21
Solution
that means no?
he writes php -m
in /etc/php/7.0/cli/conf.d/20-curl.ini ?
No means no curl in phpinfo and accordingly in error when calling any curl function.
php -m output the following:
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib

[Zend Modules]
Zend OPcache


in /etc/php/7.0/cli/conf.d/20-curl.ini
; configuration for php curl module
; priority=20
extension=curl.so
- Judge.Shanahan commented on July 8th 19 at 11:24
: it's weird because curl is loaded. and can somewhere to copy the output of phpinfo and throw a link here? I'm afraid that here this sheet will not fit.. - Mackenzie.Rogahn71 commented on July 8th 19 at 11:27
curl is loaded in cli. Have php as module of Apache is certainly a different config. The location of the config can be found in phpinfo (running via the web server!) - Ignacio_Romaguera commented on July 8th 19 at 11:30
: pastebin.com/CZd8HdSt
there is another point, version to phpinfo PHP Version 7.0.8-1+deb.sury.org~xenial+2, and in the console PHP 7.0.8-2+deb.sury.org~xenial+1 (cli) ( NTS )

Here's the catch campaign, the version of php in phpinfo 7.0.8-1, and the console 7.0.8-2. OK, if that's the case, how to do that would use the same version? - Judge.Shanahan commented on July 8th 19 at 11:33
: look here
update-alternatives --list php

generally it is strange that you have two minor versions installed.

about different configs, from listings can be seen that parse the same config. and Apache is not used here. - Mackenzie.Rogahn71 commented on July 8th 19 at 11:36
: if You were helped by my answer, it can also be noted by the decision.. - Mackenzie.Rogahn71 commented on July 8th 19 at 11:39
July 8th 19 at 11:23
Solution
As it turned out I had 2 versions of php, executed sudo apt-get remove php and all was good.

Find more questions by tags PHPUbuntuWeb Development