Home >Backend Development >PHP Problem >Does modifying php.ini require a restart?

Does modifying php.ini require a restart?

藏色散人
藏色散人Original
2023-03-20 11:08:402894browse

Modifying php.ini requires restarting. The restart method is: 1. Check the master process number of "php-fpm" through the "ps aux|grep php-fpm" command; 2. Execute "kill - USR2 1833" command to restart the process.

Does modifying php.ini require a restart?

The operating environment of this tutorial: linux5.9.8 system, PHP8.1, Dell G3 computer.

Does modification of php.ini require a restart?

need.

You need to restart after modifying the PHP.ini file in Linux;

Here’s how to do it:

Check the master process number of php-fpm first

Use the command:

ps aux|grep php-fpm
admin     1789  0.0  0.2 113192  2084 ?        Ss   Jan19   0:00 /bin/bash -c source /etc/bashrc; (echo -e " === Starting app at: $(date) ==="; /usr/local/php/sbin/php-fpm -F) &>> /home/admin/app.log
admin     1826  0.0  0.1 113196  1052 ?        S    Jan19   0:00 /bin/bash -c source /etc/bashrc; (echo -e " === Starting app at: $(date) ==="; /usr/local/php/sbin/php-fpm -F) &>> /home/admin/app.log
admin     1833  0.0  0.6 269336  6148 ?        Ss   Jan19   0:41 php-fpm: master process (/usr/local/php/etc/php-fpm.conf)
admin     1930  0.0  1.9 273716 19768 ?        S    Jan19   0:55 php-fpm: pool www
admin     1931  0.0  0.9 271664  9472 ?        S    Jan19   0:06 php-fpm: pool www
admin    10893  0.0  1.9 273692 19376 ?        S    Feb02   0:35 php-fpm: pool www
admin    14819  0.0  1.9 273692 19172 ?        S    Jan23   0:48 php-fpm: pool www
root     23186  0.0  0.2 112724  2252 pts/1    S+   21:47   0:00 grep --color=auto php-fpm
admin    30209  0.0  1.3 271448 13996 ?        S    Feb01   0:03 php-fpm: pool www

Here: master process number: 1833

Use the restart process command: kill -USR2

kill -USR2 1833 It’s ok .

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of Does modifying php.ini require a restart?. 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