Configuring php. ini Ubuntu 16.04 LTS

After installing php with the command sudo apt-get install php and extensions like sudo apt-get install php-mysql, do I need to register their connection in /etc/php/7.0/cli/php. ini ?
And then after the recommendations in the next guide, uncomment the line ;extension=msql.so the interpreter breaks.

What are the minimum extensions needed for web development and how to connect them correctly (do I need to register their connection in php. ini and how?)?

Author: discipleartem, 2017-06-24

1 answers

In Ubuntu, you do not need to edit the main php.ini to connect modules (at least for those that are installed from the ubuntu repository itself).

Configs connecting modules are placed in the directory /etc/php/7.0/mods-available/ or similar, the version (7.0 in this case) may be different or absent altogether, depending on the version of Ubuntu (the latter I assume based on the experience of using older versions of Debian).

To activate/deactivate the module, you need to create/delete it in the /etc/php/7.0/cli/conf.d/ or /etc/php/7.0/fpm/conf.d/ directory, simlink (symbolic link, see man ln) the corresponding config from the /etc/php/7.0/mods-available/ directory. Such symlinks are created by default after installing the package with the corresponding module, so by default you do not need to do anything to activate the module.

The /etc/php/7.0/cli/conf.d/ directory contains configuration files (usually only module connections).) for PHP version 7.0 running in command line mode (cli). The directory /etc/php/7.0/fpm/conf.d/ contains the same for PHP 7.0 running in FastCGI server mode (php-fpm daemon).

P.S. For web development, the minimum necessary desire and understanding of what you are working with, and not modules. Modules are secondary

 4
Author: MrClon, 2017-06-24 12:05:34