2 # Update options related to PHP directories
4 require './phpini-lib.pl';
5 &error_setup($text{'dirs_err'});
7 &can_php_config($in{'file'}) || &error($text{'list_ecannot'});
9 &lock_file($in{'file'});
10 $conf = &get_config($in{'file'});
12 # Validate and save inputs
13 if ($in{'include_def'}) {
14 &save_directive($conf, "include_path", undef);
17 @incs = split(/\r?\n/, $in{'include'});
18 @incs || &error($text{'dirs_eincs'});
19 &save_directive($conf, "include_path", join(":", @incs));
22 $in{'ext_def'} || $in{'ext'} =~ /\S/ || &error($text{'dirs_eext'});
23 &save_directive($conf, "extension_dir", $in{'ext_def'} ? undef : $in{'ext'});
25 &save_directive($conf, "file_uploads", $in{'file_uploads'} || undef);
27 $in{'utmp_def'} || -d $in{'utmp'} || &error($text{'dirs_eutmp'});
28 &save_directive($conf, "upload_tmp_dir", $in{'utmp_def'} ? undef : $in{'utmp'});
30 &flush_file_lines_as_user($in{'file'});
31 &unlock_file($in{'file'});
32 &graceful_apache_restart();
33 &webmin_log("dirs", undef, $in{'file'});
35 &redirect("list_ini.cgi?file=".&urlize($in{'file'}));