How to find the php. ini file?

Source: Internet
Author: User
I failed to find php. ini using the command {code...}, but the apache + php application on the server can run normally. How can I find the php. ini file read by apache? I use commands

find / -name 'php.ini'

Php. ini is not found, but apache + php applications on the server can run normally.

How can I find the php. ini file read by apache?

Reply content:

I use commands

find / -name 'php.ini'

Php. ini is not found, but apache + php applications on the server can run normally.

How can I find the php. ini file read by apache?

Use PHP Functionsphpinfo()Lookphp.iniIn which region?

But youfindNo.

You can copy the php. ini-development or php. ini-production of the php source codephpinfo()The object type, such

sudo mv php.ini-development /usr/local/php/lib/php.ini

Note that this development is intended for production systems.

Apache has not been used for a long time. Since you can run it, it is estimated that you have used the default configuration.

In apache, even if you set php. ini, php_flag and. htaccess can override your php. ini.

Same as @ JohnLui's answer, usephpinfo();Output CurrentPHPAnd there isLoaded Configuration FileCorrespondingphp.iniFile Location.

In addition,php.iniYes.php.iniSo it is useless to search for this file name.


  

Command line can be obtained using php-I | grep php. ini.

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.