Submitted by jfquestiaux on Wed, 02/09/2011 - 10:18
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
Submitted by JamieCameron on Wed, 02/09/2011 - 12:40 Comment #1
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
Submitted by Locutus on Thu, 02/10/2011 - 06:29 Comment #2
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 theFCGId
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 directivesphp_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.Submitted by jfquestiaux on Thu, 02/10/2011 - 07:56 Comment #3
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.
Submitted by Locutus on Thu, 02/10/2011 - 11:01 Comment #4
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. Withkill -9 <processid>
you can kill a specific one.Submitted by Issues on Thu, 02/24/2011 - 12:22 Comment #5
Automatically closed -- issue fixed for 2 weeks with no activity.