Properties->Advanced System Settings->Environment Variables"; then create a new environment variable PHPRC; finally restart phpserver and you will see that the loading path of "php.ini" has changed."/> Properties->Advanced System Settings->Environment Variables"; then create a new environment variable PHPRC; finally restart phpserver and you will see that the loading path of "php.ini" has changed.">

Home >Backend Development >PHP Problem >How to modify the configuration path of php.ini

How to modify the configuration path of php.ini

藏色散人
藏色散人Original
2020-07-10 09:47:203717browse

How to modify the path of php.ini: First click "Computer->Properties->Advanced System Settings->Environment Variables"; then create a new environment variable PHPRC; finally restart phpserver and you will see "php .ini" changes.

How to modify the configuration path of php.ini

Modify the configuration path of php.ini under win7

By directly decompressing the downloaded zip package under win7 PHP is installed. At this time, the installation path and configuration file path of PHP are not set in the environment variables. The default loading path of the configuration file is the C:\Windows directory. At this time, there is no configuration file, so there is no configuration file. At this time There is no way to configure php. You need to manually move the php.ini file to the C:\Windows directory.

If you don’t want to move it to the C:\Windows directory, here is another way to set the path of php.ini to the php installation path and add environment variables.

Computer->Properties->Advanced System Settings->Environment Variables

Create a new environment variable PHPRC, pointing to the PHP installation path. As shown in the picture below, my php was decompressed to the D drive, so the environment variable is D:\php5.

How to modify the configuration path of php.ini

After this setting is completed, you can restart phpserver (apache2, etc.). You can see that the loading path of php.ini changes, and the configuration of php.ini also takes effect.

How to modify the configuration path of php.ini

The php.ini configuration file does not exist in the php installation directory by default. You need to change php.ini-development to php.ini.

For more related knowledge, please visit PHP Chinese website!

The above is the detailed content of How to modify the configuration path of php.ini. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn