Home >Backend Development >PHP Problem >linux modify php.ini and restart php-fpm

linux modify php.ini and restart php-fpm

藏色散人
藏色散人Original
2020-08-19 09:59:104710browse

Linux method to modify php.ini and restart php-fpm: first open "php-fpm.pid" and get the id; then directly execute the command "kill -USR2 42890"; finally close "php-fpm" and restart.

linux modify php.ini and restart php-fpm

Recommended: "PHP Video Tutorial"

Restart php-fpm after modifying php.ini

It is recommended to open /usr/local/php/var/run/php-fpm.pid to get the id 42890

Kill -USR2 directly 42890

Best

php-fpm 关闭:
kill -INT 'cat /usr/local/php/var/run/php-fpm.pid'
php-fpm 重启:
kill -USR2 'cat /usr/local/php/var/run/php-fpm.pid'
移动文件| 重新命名|

mv file name new path file name

Test whether the configuration is correct

nginx -t

nginx Restart

nginx -s reload

After installing the extension, modify php.ini Add extension= /path/shmop.so

Restart php infinitely, nginx just doesn’t work

After checking phpinfo, I found that the value of Loaded Configuration File is none

It turns out that when php-fpm starts , php.ini was not specified, so it never took effect...

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

The above is the detailed content of linux modify php.ini and restart php-fpm. 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