Can't update website options with new Virtualmin 7.10.0 and Nginx

Can’t update website options with new Virtualmin 7.10.0 and Nginx

Virtualmin, Web Configuration, Website options gives error

ERROR — PERL EXECUTION FAILED
Can't use an undefined value as an ARRAY reference at /usr/share/webmin/authentic-theme/authentic.pl line 1321. 

Image:

image

Tested with a fresh install as per below:

SYSTEM INFORMATION
OS type and version Debian Linux 12
Webmin version 2.105
Usermin version 2.005
Virtualmin version 7.10.0
Theme version 21.09.5
Package updates All installed packages are up to date

Hello,

This is an odd issue that I cannot reproduce. Have you tried manually restarting Webmin by running /etc/webmin/restart or /etc/webmin/restart-by-force-kill?

Tried. Did not fix. Nor did a reboot. Nor did using a different OS (Rocky 9).

Will have a poke around for more info. Affected all servers until reverted to Virtualmin 7.9.0

Changing line 1321 from

    return "" if ( !@$rows);

to

    return "" if (!$rows || !@$rows);

makes the visible problem go away and restores previous behaviour, as far as I can tell.

Do you want me to raise an issue on github and link it to a pull request?

Ideally

  1. Authentic theme should get a fix
  2. Virtualmin should be investigated as to why an undefined reference gets passed in in 7.10.0 and not 7.9.0
  3. Why the problem cannot be reproduced

Thanks, no need. I already fixed it:

Though, I’m curious now, how Edit Website page looks like for you after applying this patch? Could you share a screenshot?

Uploaded.

Thanks for fix. 1. above is covered .

Cause of undefined reference is empty data for ‘CGI script execution mode’ radio buttons.

The output you shared seems impossible to me.

If you edit virtual-server/edit_website.cgi file and add on line 94 right after if (@cgimodes > 0) { var_dump(\@cgimodes); line, so it looks like this:

my @cgimodes = &has_cgi_support();
if (@cgimodes > 0) {
	var_dump(\@cgimodes);
    ...
}

… and refresh the page. What screenshot looks like then?

Screenshot from 2024-03-27 00-02-35

Alright, thanks! Again, by looking at the code I do not see how this woulb be possible to get the output you’re getting!

Try running in SSH:

apt-get install --reinstall webmin-virtual-server

… and see if that changes anything.

Ran command requested, rebooted and reinserted same var_dump command.
Same result as above.

There is only one cgimode listed in cgimodes array: ‘fcgiwrap’.

It is not possible to have radio buttons when there is only one option. Shouldn’t there be a ‘CGI Scripts disabled’ radio choice, that would arise from a more correct cgimodes array value like [‘fcgiwrap’, ‘cgidisabled’]?

Screenshot for help for ‘CGI script execution mode’:

image

Since running Nginx, suEXEC wrapper is not relevant

Yes, absolutely and this is exactly what you should see as you have fcgiwrap option in the list of available modes! To be clear, is this Virtualmin Pro package you have installed on this Debian 12 system?

No. GPL version. I have a mixture of PRO and GPL Virtulamin servers running. All of them had the exact same problem with virtualmin 7.10.0.

I have a temporarily unused PRO license I can apply but I don’t see it will make any difference.

To be clear, I have dozens of test machines, including Debian 12 with Virtualmin GPL and Nginx, and it’s opened right now … and just I don’t see such issue!

I don’t even understand how exactly you could face that issue in the first place (as you showed in the second screenshot)? Unless you mis-edited some Virtualmin files and forgotten about it … as the results you shared are simply impossible – first, because if there are modes available it will simply print those radios (should happen in your case), second if the list is empty, it will just print nothing.

No. I only report such issues after verification with a fresh install on a newly created x86 arch server.

I will try another fresh install from scratch and will choose only the defaults from the Install Wizard, we are invited to complete. I won’t even add in a few favourite extra packages and won’t even run apt update before installing virtualmin.

I am not sure if this is linked or different.

It IS a different OS (Ubuntu) and this one crops up immediately in opening Website Options.


again reboot doesn’t clear it. Is there a new theme version to load?

I just did another fresh install, Debian 12 with Nginx on a rebuilt CPX11 VPS server on Hetzner. Two x86(AMD), that is amd64, VCPUS. 2GB RAM.

No extra packages. No ‘apt update’. Cancelled out of post install wizard to ensure only defaults used. Added a single top-level server using only defaults.

Same problem as reported by me earlier and same as reported just now with Ubuntu by @Stegan.

1 Like

If this can be undefined (and it can), you should check for that, too, I think.

@Joe, I took a deeper look, and now realized what the issue is!

We just need to release a new Virtualmin Nginx module to fix it!

Not unless strict mode and warnings are enabled.

Strict and warnings should be enabled.