views:

228

answers:

1

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.

+1  A: 

The .user.ini files will be read during the startup of each request by the fcgi sapi module.
Besides that I have only found code that reads the php.ini when the module is started (i.e. when the fcgi process is created).
You might want to ask this question on server fault.

VolkerK
Thanks VolkerK, but your solution for per directory configuration, I am looking for a solution to reload global PHP configuration.
eyazici
+1 for server fault suggesstion.
eyazici