Home > Backend Development > PHP Problem > What to do if php.ini cannot be found

What to do if php.ini cannot be found

coldplay.xixi
Release: 2023-03-03 17:32:01
Original
5014 people have browsed it

Solution to the problem that php.ini cannot be found: 1. Obtain the lib directory through the php source code package, which is in [/usr/local/php/]; 2. Enter the php source code package directory and copy the code to In the lib folder under the PHP installation directory, switch to [/usr/local/php/lib].

What to do if php.ini cannot be found

Solution to php.ini not found:

1. Under normal circumstances, the php.ini file is In the lib directory under the php installation directory, for example, my php installation directory is in /usr/local/php/, but I cannot find the php.ini configuration file in the /usr/local/php/lib directory. .

I searched for some answers on the Internet, and finally came to the conclusion: If the php.ini file is not generated when compiling and installing PHP, it can be obtained through the PHP source code package;

2. Direct method:

1. Enter the php source code package directory, which is the directory where you downloaded the php source code package and decompressed it. Generally, we usually download the source code package to the /usr/src/ directory where I decompressed it. The directory is:/usr/src/php-5.6.15/Look at all the files in this directory, you will find that there are two files in it: php.ini-development and php.ini-production

2. Copy php.ini-development or php.ini-production Go to the lib folder in the php installation directory /usr/local/php/lib and rename it For php.ini, the command is:

cp php.ini-production /usr/local/php/lib php.ini
Copy after login

What to do if php.ini cannot be found

3. Finally switch to /usr/local/php/lib You can see the php.ini file, and you're done!

Relevant learning recommendations: php graphic tutorial

The above is the detailed content of What to do if php.ini cannot be found. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template