Modify the Apache configuration to specify the location of the PHP configuration file Phpini

Source: Internet
Author: User
Tags phpinfo
General Apache after installing PHP, PHP configuration file default load location under the php/lib/folder, if there is no php.ini file under the folder, Apache will not find the PHP configuration file, there are two methods,
The first method is to copy the same version of the PHP configuration file to the default load folder, then the configuration in this configuration file will be applied.

The second method is to specify an existing php.ini location. Here's how:

(add Phpinidir/usr/local/lib/php.ini in the last line of the httpd.conf file)

Such as:


After the modified Apache configuration is as follows:

You can view it by accessing a PHP file that means output phpinfo ().


The above describes the modification of the Apache configuration specified PHP configuration file Phpini location, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.