Updating PHP settings for new virtual servers

Where do you update the settings that are used for the php.ini file for newly created virtual servers? I changed the master settings in Webmin for the server, but new accounts still have the old settings.



tpnsolutions's picture
Submitted by tpnsolutions on Sun, 02/21/2010 - 08:37

Are you using GPL or Pro?

Howdy -- this typically uses the system php.ini file in /etc/. Sometimes, there can be multiple php.ini files there (for example, one for mod_php, CGI, and CLI). In that case, I suspect Virtualmin chooses it based on what it's current PHP execution mode is set to (I think, though I'm not entirely certain ;-)

So, if you're making changes to the system PHP configuration, there may simply be a different one in /etc/ that you need to tweak.

Also, there's an option in System Settings -> Server Templates -> Default Apache Website called "Template PHP 5 configuration file", that allows you to explicitly which php.ini file to use for new Virtual Servers.

And lastly, if you like the defaults as they are, but just want to tweak a parameter here and there, you may with to peek at the " PHP configuration variables for scripts" setting in that same screen. That's good for changing, say, PHP's memory limits. You could make the memory limits higher in some templates than in others using that setting.