Home  >  Article  >  Backend Development  >  Where exactly is the php.ini file? _PHP Tutorial

Where exactly is the php.ini file? _PHP Tutorial

WBOY
WBOYOriginal
2016-07-14 10:11:012443browse

If the php version is 5.2.x

If it is a lamp environment, there will be a php-5.2.x folder after decompressing the php source file php-5.2.x.tar.gz.
Carry out in the php-5.2.x folder./configure --prefix=/opt/php5.2, make, make intall,
Then the php5.2 folder will be produced under /opt/ (this folder is required for runtime).


After successful installation, open the phpinfo file.


[php]
phpinfo();

phpinfo();

Attribute: Configuration File (php.ini) Path contains the path pointed to by php.ini.

However, when entering the path, I found that there is no php.ini file, so where is php.ini?

How to find it:
Exit the php5.2 folder to the upper-level directory, and then execute the following search command:
find ./ -name "php.ini*"

Find results: (my own environment)
./php-5.2.17/php.ini-recommended
./php-5.2.17/php.ini-dist


Oh, it turns out to be the folder after decompression of php-5.2.x!

cp ./php-5.2.17/php.ini-dist php5.2/

Restart Apache

Refresh the phpinfo file and you will find your php.ini file.

Loaded Configuration File:xxxxxxxxx

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477401.htmlTechArticleIf the php version is 5.2.x, if it is a lamp environment, the php source file php-5.2.x.tar After decompressing .gz, there will be a php-5.2.x folder. Go to the php-5.2.x folder./configure --prefix=...
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