Home > Backend Development > PHP Problem > What should I do if php.ini is not found when installing php7?

What should I do if php.ini is not found when installing php7?

醉折花枝作酒筹
Release: 2023-03-09 11:28:02
Original
3555 people have browsed it

Method: First use the "phpinfo()" function to view the PHP configuration details; then find the source code location based on the PHP configuration information; finally use the "cp" command to copy the configuration file in the source code to the PHP installation directory. bin and rename it to php.ini.

The operating environment of this tutorial: centos7 system, php7.0.13 version, thinkpad t480 computer

cannot be found after installing php under centos php.ini, and then check phpinfo(), it shows that it is under usr/local/php/bin, but it is not there after I checked. At this time, you need to copy one in your php source code.

What should I do if php.ini is not found when installing php7?

My php source code is under /usr/local/src/php

There are two php configuration files in the source code
What should I do if php.ini is not found when installing php7?

One is development mode and the other is production mode, depending on your needs. Directly copy the file to bin in the PHP installation directory and rename it to php.ini

# cp /usr/local/src/php/php-7.0.13/php.ini-development /usr/local/php/lib/php.ini
Copy after login

Recommended: "2021 PHP Interview Questions Summary (Collection)》《php video tutorial

The above is the detailed content of What should I do if php.ini is not found when installing php7?. 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