Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using PHP FastCGI SAPI on my web hosting environment to run PHP applications. To spawn FCGI processes I use spawn-fcgi helper program. My problem is whenever I make a change to php.ini file, I have to kill and respawn each FastCGI server for the new configuration to take effect.

Is there a way to reload PHP configuration(ie. php.ini directives) without respawning each FastCGI server? I try sending hangup signal (ie. kill -HUP PHPCGIPID) to the servers but this will result in termination of the servers.

share|improve this question
up vote 1 down vote accepted

As far as I know, PHP's FastCGI interpreter doesn't react to signals like HUP, USR1 or USR2 to reload its configuration.

Maybe PHP-FPM could help you to achieve what you want. On the downside, it requires patching PHP.

share|improve this answer
As of PHP 5.3.3, patching is no longer required. – Emre Yazici Jul 27 '11 at 19:29

If the servers are spawned automatically, kill them. If they’re manually started, restart them. PHP doesn’t have the ability to reload its own configuration — and generally, killing/restarting is not a problem. Is there a reason why you can’t kill them in this instance?

share|improve this answer

If you user PHP5 try this

sudo /etc/init.d/php5-fpm reload


sudo /etc/init.d/php-fpm reload

This command will restart server gracefully without closing existing connections.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.