Error message after update to 3.82.gpl: Undefined subroutine &virtual_server::compare_versions called at virtual-server-lib-func

After update to 3.82.gpl, I get the error message "Undefined subroutine &virtual_server::compare_versions called at virtual-server-lib-funcs.pl line 11716" when I do a "re-check configuration".

The code at that line checks if the version of pbzip2 is sufficient, so this error only shows up when pbzip2 is enabled. The function "compare_versions" is not defined.

Virtualmin runs fine when I just disable this check because I know that I have the right version installed.

Status: 
Closed (fixed)

Comments

Can you verify that there isn't a hung webmin process on your system?

To do that, first stop Webmin: /etc/init.d/webmin stop

Then see if any Webmin processes are still there with: ps auxw | grep miniserv | grep webmin

Do any miniserv.pl processes show up when you do that? If so, go ahead and kill them, then restart Webmin with "/etc/init.d/webmin start".

Let us know if that does the trick!

Hello,

I had the same issue, and there were no hung webmin processes. The problem remains after the stop and start.

I can rule out a hung webmin process as I even rebooted the server.

The pbzip2-check-code is new in 3.82, so I think the compare_versions function is simply missing.

A workaround is for now to disable just this few lines.

This is actually a Virtualmin GPL bug, sorry :-(

It happens because a function was included in the pro version but not GPL. The fix is to edit /usr/share/webmin/virtual-server/virtual-server-lib-funcs.pl and remove lines 11716 to 11718, which read :

        if (&compare_versions($ver, "1.0.4") < 0) {
                return &text('check_epbzip2ver', "1.0.4", $ver);
                }

Then run :

/etc/webmin/restart

However, this will disable the check for a new enough pbzip2 version. Make sure that if you run pbzip2 -V it displays at least version 1.0.4..

A fix will go into Virtualmin GPL 3.83.

Automatically closed -- issue fixed for 2 weeks with no activity.