How to restart PHP

Hi,

I want to change some PHP settings in the php.ini file. I edited with no problem the file with an external editor, but how do I restart PHP to take the change in account ?

And also, I edited the local value of a specific server. How do I edit the master value (and apply it) so I don't have to edit it every time I create a new server ?

Regards.

Status: 
Closed (fixed)

Comments

To force a config reload, you'd need to restart Apache. This can be done from the System Information page in Virtualmin.

To change the default config for new domains, edit /etc/php5/cgi/php.ini

In addition to Jamie's answer, I'd like to add that the restarting/editing procedure is slightly different depending on whether you use the mod_php method or the FCGId method.

Local PHP values for specific servers (as in a completely separate PHP INI file for that server) are only applicable when using FCGId. In mod_php mode, only the global file that Jamie mentioned is used. You can then use the Apache directives php_value and co. though to configure single values per domain, which you can do under Services -> Configure Website -> PHP.

Furthermore, in case of FCGId, you can restart PHP, in addition to restarting Apache, also by killing the CGI processes owned by the corresponding website user.

Thank you both. I think I use the FCGId method (I have "cgi-fcgi" as PHP server API), but I don't know how to kill the CGI process. So far I just restarted Apache and the new settings are taken into account.

Yes, restarting Apache sure causes the changed config to be applied. :)

To kill just the CGI process, you can login via SSH and do ps aux | grep cgi, that should list all FCGId processes with their respective users and process IDs. With kill -9 <processid> you can kill a specific one.

Automatically closed -- issue fixed for 2 weeks with no activity.