[BlueOnyx:06873] Re: question on default php values
Michael Stauber
mstauber at blueonyx.it
Fri Apr 1 15:02:06 -05 2011
Hi Ken,
>> Server Management --> Security --> php Settings
>
> I'll try changing that and then test it again; but the settings I am seeing
> don't seem to match the settings showing on that page.
Yeah, the default settings are inherited by any new site that you create. But
changing the defaults doesn't go back and update already existing sites. For
that you'd have to use the GUI and have to modify each and any site's php-
settings.
Or if you want a command line approach, make a copy of this script:
/usr/sausalito/sbin/set_default_php_settings.pl
Then edit your copy and set it to the defaults you want and then run it.
That'll walk through all sites and sets them to the new defaults.
You just have to change this section of code in your copy of the script:
# Walk through all Vsites:
for my $vsite (@vhosts) {
($ok, my $my_vsite) = $cce->get($vsite);
print "Processing Site: $my_vsite->{fqdn} \n";
($ok) = $cce->set($vsite, 'PHPVsite',{
'open_basedir' => '/tmp/:/var/lib/php/session/',
'max_execution_time' => '30',
'safe_mode_exec_dir' => '.',
'upload_max_filesize' => '2M',
'max_input_time' => '60',
'safe_mode_gid' => 'Off',
'safe_mode_protected_env_vars' => 'LD_LIBRARY_PATH',
'allow_url_fopen' => 'Off',
'memory_limit' => '16M',
'safe_mode_include_dir' => '.',
'safe_mode_allowed_env_vars' => 'PHP_',
'allow_url_include' => 'Off',
'register_globals' => 'Off',
'safe_mode' => 'On',
'post_max_size' => '8M',
'force_update' => time()
});
}
Just one "need to know" regarding the "open_basedir" path: The home directory
of any Vsite is automatically appended to the "open_basedir" path that you
specify in that script. Also don't modify the "force_update" parameter.
--
With best regards
Michael Stauber
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20110401/8563b4ee/attachment.html>
More information about the Blueonyx
mailing list