How does one view the path of the php configuration file php. ini?

Source: Internet
Author: User
How does one view the path of the php configuration file php. ini?

Let us know two ways to find the path of the php configuration file php. ini.

Usually php. ini is located:

/Etc directory or/usr/local/lib directory.
If you still cannot find php. ini or find the php. ini modification that does not take effect (in fact, it is not correct), use the following method:
1. create a php file and write the following code

  1. Echo phpinfo ();

Then, visit the page in the browser and search for php. ini. The result of environment variables in the phpinfo function is used.

2. Execute. (you need to modify php to your own path)
/Usr/local/php/bin/php -- ini

The path where php. ini is located and which path does not contain the php. ini file is displayed,

  1. Configuration File (php. ini) Path:/usr/local/php/lib
  2. Loaded Configuration File: (none)
  3. Scan for additional. ini files in: (none)
  4. Additional. ini files parsed: (none)

The php. ini location is modified as follows: the php. ini file is put on/usr/local/lib by default,

You can use the -- with-config-file-path parameter during compilation to modify the storage location of php. ini.
For example,
You can use -- with-config-file-path =/etc
Store php. ini under/etc, and copy php. ini-dist from the source package to/etc/php. ini.

All major routes can be used in Rome. you can refer to one of the above two methods to find the location of the php. ini file.

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.