Why is there mcrypt extension in phpinfo, but there is no mcrypt extension in phpinfo in php-m, but not in php-m?
Reply content:
Why is there mcrypt extension in phpinfo, but not in php-m?
PHP info. Do you want to view it on a webpage?
Currently, we generally use fpm to run web pages.
Php-m runs with cli.
This is caused by different fpm and cli configurations.
Mobile phone code is not easy ....
Different running methods (SAPI) are used to load different INI files.
In linux, the configuration of php is divided into apache, cli, cgi, and so on.
You can specify to load php. ini during cli running so that you can get the desired result.
Php-c/etc/php5/apache/php. ini-f test. php
PHP runs in the form of SAPI calls. Most people often use web pages to call php-fpm, while php-m is to call command line sapi, that is, cli, the two are different operation modes. The former is used for webpage requests, and the latter is used for command lines.
The two modes have their own configuration files. in/etc/php5/fpm and/etc/php5/cli, you will find that they are similar.
In addition, many people use fpm to ask cli problems...