Submitted by ADDISON74 on Mon, 02/25/2019 - 12:01
This is a fresh install Debian 9/Virtualmin. Please go to Webmin section then Networking. Click on "Virtualmin Domain Registration" link. I assume you already fixed this page to load its content with this solution: https://www.virtualmin.com/node/64627.
Now click on "List all registered domains" link. The loaded page will show this error message:
Error - Perl execution failed
Can't locate virtualmin-registrar-lib.pl in @INC (@INC contains: /usr/share/webmin /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/webmin/virtualmin-registrar/list.cgi line 9.
File list.cgi exists on server at this location /usr/share/webmin/virtualmin-registrar/list.cgi.
I suggest in line 9 adding a ./ in front of virtualmin-registratar-lib.pl. Here you go:
require './virtualmin-registrar-lib.pl';
Status:
Fixed (pending)
Comments
Submitted by ADDISON74 on Fri, 01/10/2020 - 16:12 Comment #1
WOW. It's been a year from reporting and this bug is still in the latest version.
Hi,
This is odd. I don't see this error on by Debian 9.
What is the output of:
Submitted by ADDISON74 on Sat, 01/11/2020 - 02:43 Comment #3
The output is :
root@server:~# dpkg -l 'webmin-*' |grep webmin-virtualmin-registrar
ii webmin-virtualmin-registrar 2.5 all Webmin module for 'Virtualmin Domain Registration'
Debian 10 Buster + Virtualmin latest in a VM for testing without any modification.
Submitted by ADDISON74 on Sat, 01/11/2020 - 02:51 Comment #4
The error is now not in list.cgi file. See bellow:
500 - Error - Perl execution failed
Can't locate virtualmin-registrar-lib.pl in @INC (@INC contains: /usr/share/webmin /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/webmin/virtualmin-registrar/index.cgi line 10.
Submitted by ADDISON74 on Sat, 01/11/2020 - 02:56 Comment #5
Checking the file system both files index.cgi and virtualmin-registrar-lib.pl are in the same folder. The require tag is pointing to a file into the same directory with index.cgi.
In order to fix this I used the absolute path:
#!/usr/bin/perl
# Show a list of accounts, and a menu to add a new one
use strict;
no strict 'refs';
use warnings;
our (%access, %text);
our @registrar_types;
require '/usr/share/webmin/virtualmin-registrar/virtualmin-registrar-lib.pl';
if (!$access{'registrar'}) {
Submitted by ADDISON74 on Sat, 01/11/2020 - 03:33 Comment #6
... or if you don't like the full path to the required file you can use this fix too:
#!/usr/bin/perl
# Show a list of accounts, and a menu to add a new one
use strict;
no strict 'refs';
use warnings;
our (%access, %text);
our @registrar_types;
require './virtualmin-registrar-lib.pl';
if (!$access{'registrar'}) {
Submitted by ADDISON74 on Sat, 01/11/2020 - 04:21 Comment #7
Also list.cgi should have the same fix require './virtualmin-registrar-lib.pl';
Joe, the package for it, has to be updated and pushed to our repos.