Home >Backend Development >PHP Tutorial >Please tell me how to restart php-fpm in php7 and how to remove X-Powered-By:PHP?
Background:
Server: CentOS7 + nginx/1.9.15 + PHP7.0.8 + Mysql
Reason:
I found that the response header contained: That's good.
I don’t know if it’s the reason why php-fpm didn’t restart, but I found that php-fpm doesn’t have the option to restart.
May I ask the experts how to deal with the above situation?
How to restart php-fpm and how to remove X-Powered-By?
Summary: If there are modifications to php.ini, in addition to restarting nginx, for centOS, you need to kill the php-fpm process and then start it again, so that the modifications will be effective!
Reply content:
Background:Reason:
I found that the response header contained: That's good.
Please ask the masters how to deal with the above situation?
How to restart php-fpm and how to remove X-Powered-By?
Thank you
ps aux | grep php-fpm
Then start
/usr/local/php7/sbin/php-fpm
How to remove X-Powered-By? Your operation is correct. If it doesn’t work, check which directory php.ini is reading from
php -i | grep php.ini, and then modify it accordingly
Ubuntu is: sudo service php7.0-fpm restart, you can refer to it and try it haha
I have not used php-fpm on CentOS, but I have used it on Ubuntu. The restart command is
sudo service php5-fpm restart
. For reference only.