Home >Backend Development >PHP Tutorial >php does not have a php.ini configuration file

php does not have a php.ini configuration file

WBOY
WBOYOriginal
2016-12-05 13:44:161963browse

Using the PHP environment configured by others in Tencent Cloud. . .

I need to add extensions when configuring redis today, but I can’t find the php.ini configuration file

phpinfo is displayed in /data/home/server/php-7.0.0/etc, but this directory does not exist

find The command search also doesn’t even have a php.ini file

php -i | grep php.ini is also displayed in /data/home/server/php-7.0.0/etc

But indeed not. .

Can php run without php.ini? . It can also connect to the database and display loaded modules. . .

Completely shattered. . .

php does not have a php.ini configuration file

php does not have a php.ini configuration file

Reply content:

Using the PHP environment configured by others in Tencent Cloud. . .

I need to add extensions when configuring redis today, but I can’t find the php.ini configuration file

phpinfo is displayed in /data/home/server/php-7.0.0/etc, but this directory does not exist

find The command search also doesn’t even have a php.ini file

php -i | grep php.ini is also displayed in /data/home/server/php-7.0.0/etc

But indeed not. .

Can php run without php.ini? . It can also connect to the database and display loaded modules. . .

Completely shattered. . .

php does not have a php.ini configuration file

php does not have a php.ini configuration file

php.ini location

  • You need to find php.ini-development or php.ini-production in the php compilation directory and copy it to /data/home/server/php-7.0.0/etc and rename it to php.ini

  • Or you can download a source code package from the php official website, copy php.ini-development or php.ini-production under the source code package to the directory /data/home/server/php-7.0.0/etc, and rename it for php.ini

php run

When compiling php, some php parameters have been specified. You can view these parameters through phpinfo

Isn’t it possible to directly yum install php7-redis to install the extension? Then restart php-fpm

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