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

What to do if php.ini cannot be read

藏色散人
Release: 2023-03-09 18:06:01
Original
2337 people have browsed it

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"
Copy after login

Solution 2: Specify the path at startup

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

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!

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