Home  >  Q&A  >  body text

apache configuration file

Excuse me, there is a line of code to set the php.ini file in the apache configuration file, as shown below. Why can it run without removing the "#" sign in front of PHPIniDir? I installed this using wamp, and then I watched the video on configuring apache separately. It said that the "#" must be removed.

天蓬老师天蓬老师2683 days ago521

reply all(1)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-16 16:59:59

    Here is the loading path of the PHP configuration file specified by APACHE. If commented out, PHP will load the configuration file in the following order.

    • PHPIniDir (Apache 2 module only)

    • Registry key: HKEY_LOCAL_MACHINE—SOFTWARE—PHPIniFilePath

    • Environment variable:%PHPRC%

    • PHP5 directory (for CLI), or web server directory (for SAPI modules)

    • Windows directory (C:windows or C:winnt)
      So if it is Apache + PHP5, you can use PHPIniDir to specify the path to the php5 configuration file php.ini.

    reply
    0
  • Cancelreply