F
F
fogersp2016-05-19 16:30:54
linux
fogersp, 2016-05-19 16:30:54

PHP 5 and PHP 7 after UBUNTU update to 16.04?

Good afternoon. Updated Ubuntu to 16.04. Now I don’t understand something: it appeared in addition to php5.6 - php7 and if I put some extension, then it doesn’t appear in the /etc/php5/mods-available ini directory, php -m does not show this module (for example, php -gd), but it appears in /etc/php/7.0/mods-available.

which php = /usr/bin/php
ls -la /etc/alternatives/php = /etc/alternatives/php -> /usr/bin/php5

update-alternatives --display php
php - auto mode
  link best version is /usr/bin/php5
  link currently points to /usr/bin/php5
  link php is /usr/bin/php
  slave php.1.gz is /usr/share/man/man1/php.1.gz
/usr/bin/php5 - priority 50
  slave php.1.gz: /usr/share/man/man1/php5.1.gz

dpkg -l | grep php-gd
ii  php-gd        1:7.0+35ubuntu6     all   GD module for PHP [default]

And, when you put some extension, you can see that it is enabled only for php7:
apt install php-sqlite3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  php7.0-sqlite3
The following NEW packages will be installed:
  php-sqlite3 php7.0-sqlite3
0 upgraded, 2 newly installed, 0 to remove and 12 not upgraded.
Need to get 26,5 kB of archives.
After this operation, 122 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ru.archive.ubuntu.com/ubuntu xenial/main amd64 php7.0-sqlite3 amd64 7.0.4-7ubuntu2 [24,6 kB]
Get:2 http://ru.archive.ubuntu.com/ubuntu xenial/main amd64 php-sqlite3 all 1:7.0+35ubuntu6 [1 936 B]
Fetched 26,5 kB in 0s (211 kB/s)          
Selecting previously unselected package php7.0-sqlite3.
(Reading database ... 349225 files and directories currently installed.)
Preparing to unpack .../php7.0-sqlite3_7.0.4-7ubuntu2_amd64.deb ...
Unpacking php7.0-sqlite3 (7.0.4-7ubuntu2) ...
Selecting previously unselected package php-sqlite3.
Preparing to unpack .../php-sqlite3_1%3a7.0+35ubuntu6_all.deb ...
Unpacking php-sqlite3 (1:7.0+35ubuntu6) ...
Setting up php7.0-sqlite3 (7.0.4-7ubuntu2) ...

Creating config file /etc/php/7.0/mods-available/sqlite3.ini with new version

Creating config file /etc/php/7.0/mods-available/pdo_sqlite.ini with new version
Setting up php-sqlite3 (1:7.0+35ubuntu6) ...

php5enmod sqlite3    
WARNING: Module sqlite3 ini file doesn't exist under /etc/php5/mods-available
WARNING: Module sqlite3 ini file doesn't exist under /etc/php5/mods-available

Accordingly, php -m does not display information about the sqlite3 module. But, if I display the result of the phpinfo() function in the browser through mod-apache, sqlite3 is loaded there.
What's wrong with me?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vanya Zyuzgin, 2016-05-19
@site2life

In Debian PHP 7.0 put in /etc/php/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question