apache - Webmin php-lib.pl modification -
i have updated php version 5.5.26. php 5.4 apache configuration fcgi was:
addhandler fcgid-script .php addhandler fcgid-script .php5
with new version of php need put other config works:
<filesmatch \.php$> sethandler fcgid-script </filesmatch>
it’s ok, it’s working.
my problem virtualmin module of webmin. don’t want change config every time, have edited perl file /usr/share/webmin/virtual-server/php-lib.pl
:
# directives fcgid local $dest = "$d->{'home'}/fcgi-bin"; #push(@phplines, "addhandler fcgid-script .php"); # new config php files push(@phplines, "<filesmatch \\.php\$>"); push(@phplines, "sethandler fcgid-script"); push(@phplines, "</filesmatch>"); push(@phplines, "fcgiwrapper $dest/php$ver.fcgi .php"); foreach $v (&list_available_php_versions($d)) { #push(@phplines, # "addhandler fcgid-script .php$v->[0]"); push(@phplines, "fcgiwrapper $dest/php$v->[0].fcgi " . ".php$v->[0]"); }
but change nothing, webmin continues putting lines addhandler
. have restarted webmin, cleared file /etc/webmin/module.infos.cache
.
first of should use single quotes instead of double quotes simpler syntax:
... push(@phplines, '<filesmatch \.php$>'); push(@phplines, 'sethandler fcgid-script'); push(@phplines, '</filesmatch>'); ...
check specific file syntax errors with
perl -c /usr/share/webmin/virtual-server/php-lib.pl
add log file somewhere in file sure file gets called @ all. e.g. add before code shown above:
my $fh; open($fh, '>>', "/tmp/test.log") or die "couldn't open: $!"; print $fh "this file used!"; close $fh; ...
Comments
Post a Comment