2007-04-12 20:24:50 +00:00
|
|
|
#!/usr/local/bin/perl
|
|
|
|
# Write to a manually edited PHP config file
|
|
|
|
|
|
|
|
require './phpini-lib.pl';
|
|
|
|
&ReadParseMime();
|
|
|
|
&error_setup($text{'manual_err'});
|
|
|
|
&can_php_config($in{'file'}) || &error($text{'manual_ecannot'});
|
|
|
|
$access{'manual'} || &error($text{'manual_ecannot'});
|
|
|
|
|
|
|
|
# Validate input
|
|
|
|
$in{'data'} =~ s/\r//g;
|
|
|
|
$in{'data'} =~ /\S/ || &error($text{'manual_edata'});
|
|
|
|
|
|
|
|
# Save the file
|
2014-03-10 21:26:10 -07:00
|
|
|
&write_file_contents_as_user($in{'file'}, $in{'data'});
|
2007-04-12 20:24:50 +00:00
|
|
|
|
2017-06-01 12:45:41 -07:00
|
|
|
&graceful_apache_restart($in{'file'});
|
2007-04-12 20:24:50 +00:00
|
|
|
&webmin_log("manual", $in{'file'});
|
2012-02-20 11:52:46 -08:00
|
|
|
if ($in{'oneini'}) {
|
|
|
|
&redirect("list_ini.cgi?file=".&urlize($in{'file'}));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
&redirect("");
|
|
|
|
}
|