20120830 webmin edit_mon cgi line 316 - plembo/onemoretech GitHub Wiki

title: webmin edit_mon.cgi line 316 link: https://onemoretech.wordpress.com/2012/08/30/webmin-edit_mon-cgi-line-316/ author: lembobro description: post_id: 3289 created: 2012/08/30 10:42:52 created_gmt: 2012/08/30 14:42:52 comment_status: closed post_name: webmin-edit_mon-cgi-line-316 status: publish post_type: post

webmin edit_mon.cgi line 316

Yeah, so I upgraded webmin to 1.590 and got this weird error when trying to edit a "System and Server Status" monitor.

Error - Perl execution failed

Can't use global $_ in "my" at /usr/libexec/webmin/status/edit_mon.cgi line 316, near "($_"

After Googling around I found only one possible solution. It worked. Like the man said, there's no substitute for going to the file in question (/usr/libexec/webmin/status/edit_mon.cgi) and poking around. The ultimate fix was to change the infamous line 316 from:

my ($_, $nv) = split(/=/, $nice_values[$i], 2);

to

my ($junk, $nv) = split(/=/, $nice_values[$i], 2);

Sometimes the best things in life are free. Issue was first reported on 4 July (Happy holiday!). Bug was closed on 5 August. One hopes a patch is in the offing.

Copyright 2004-2019 Phil Lembo