Linux-why does phpinfo contain mcrypt extensions?

Source: Internet
Author: User
Tags mcrypt sapi
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...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.