A way to figure out the path to the PHP configuration file php.ini _php tips

Source: Internet
Author: User

Recently, there are Buboyu asked php.ini which directory? or modify the php.ini after why not effective? Based on the above two questions, I think it is necessary to teach the friends who have just contacted PHP how to find the path directory of PHP call php.ini.

General installation of the PHP environment is nothing but two platforms, Linux and win under the environment under the platform. And win platform mostly, because now the package is very convenient to install, such as Appserv, Wamp a piece of installation package and so on. And Linux also has lnmp one-button installation package, very convenient. Since these installations have been simplified, many of the natural Bo friends are not clear about the environment after the installation of the php.ini in which directory, or in a directory to find the php.ini file but do not know whether the PHP program called the One.

We can find the php.ini path through Phpinfo
Create a new PHP page and enter:
[Code]
<?php phpinfo ();?>
[Code]

Save exit

Use the browser to access the page, you will see a PHP configuration information related to the page

Find the configuration File (php.ini) path line

The value on the right/usr/local/webserver/php/etc is the directory where the php.ini file is located
After the final modification, remember to restart the relevant program to be effective.

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.