Home  >  Article  >  Backend Development  >  What to do if php.ini cannot be read

What to do if php.ini cannot be read

藏色散人
藏色散人Original
2021-05-17 10:29:172314browse

Solution to the problem that php.ini cannot be read: 1. Open the "/etc/init.d/php-fpm" file, and then add the specified configuration path to the "php_opts" command; 2. Just specify the path when starting.

What to do if php.ini cannot be read

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

php cannot read the specified php.ini configuration

Specify the path at startup

Solution 1: Modify the /etc/init.d/php-fpm file

 #  在这行命令上添加 指定的配置路径
 php_opts="--fpm-config $php_fpm_CONF --pid $php_fpm_PID"
 
 # 修改成
 php_opts="--fpm-config $php_fpm_CONF -c /usr/local/php7/etc/php.ini --pid $php_fpm_PID"

Solution 2: Specify the path at startup

/usr/local/php/sbin/php-fpm -y /etc/php-fpm.conf -c /etc/php.ini

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What to do if php.ini cannot be read. 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