Set mysql.allow_persistent server wide

4 posts / 0 new
Last post
#1 Wed, 05/12/2010 - 02:33
fuerst

Set mysql.allow_persistent server wide

Hi, I want to set the PHP ini variable mysql.allow_persistent to 0 for all vhosts at once. I'm using the FCGI mechanism so there seems no way to set this at a global level. Every /home/user/etc/php.ini file can easily overwrite it. Also in MySQL there seems to be no way to disallow persistent connections.

Anyone out there who knows how to disable persistent MySQL connections globally?

tia, Bernhard

Wed, 05/12/2010 - 08:47
andreychek

Yeah, each Virtual Server has it's own php.ini... but using the Virtualmin command line tools, you can perform changes on all of them at once.

To see a list of options you can use, run this from the command line:

virtualmin modify-php-ini

So, to do what you're after for all domains, one example would be:

virtualmin modify-php-ini --all-domains --ini-name mysql.allow_persistent --ini-value 0

At that point, Virtualmin will go through all your domains, and update that setting for each php.ini file.

-Eric

Wed, 05/12/2010 - 08:55
fuerst

Well, good to know. Thanks!

How about creating new virtual servers: Where does Virtualmin is copying the php.ini from for a newly created Virtual Server? From /etc/php5?

Wed, 05/12/2010 - 09:02
andreychek

Yeah, Virtualmin copies the php.ini from the system-wide copy in /etc.

Or, you can use a different file of your own choosing if you go into System Settings -> Server Templates -> Default -> Apache Website, and set "Template PHP 5 configuration file".

-Eric

Topic locked