webminのトップページを開くと、HTMLの出力途中でエラーが発生し
後続の表示がされなくなってしまった。
トップページのエラー表示
HTTP/1.0 500 Perl execution failed
Server: MiniServ/1.791
Date: Thu, 16 Jun 2016 10:41:17 GMT
Content-type: text/html; Charset=iso-8859-1
Connection: close
<h1>Error - Perl execution failed</h1>
<pre>Wide character in syswrite at /usr/libexec/webmin/miniserv.pl line 3071.
</pre>
該当箇所にエンコード処理を追加する事でとりあえず回避できた。
ファイルの最初の方でEncodeの使用を宣言しておいて、
miniserve.pl
use Encode;
syswriteする箇所を、utf8の場合のみエンコードする様に修正。
miniserve.pl
if(utf8::is_utf8($str)) {
syswrite(SOCK, encode('utf-8', $str), length(encode('utf-8', $str)));
} else {
syswrite(SOCK, $str, length($str));
}
修正後にwebminを再起動して反映。
再起動
/etc/init.d/webmin restart
これでとりあえず動くようになった。
環境は
CentOS Linux 7.2.1511
Webmin 1.791
より新しいバージョンで直っているかどうかは未確認。