error with cPanel (main) and webmin config panel(only server) is installed

Hello,
on my server cpanel and webmin is installed.
Webmin is used only manage the server main functions(no subuser,…)
the installation is successful, but starting cwaf makes problem:

Undefined subroutine &main::is_standalone called at /usr/local/cpanel/whostmgr/cgi/cwaf_sharedlib.pl line 138.
[2016-06-30 22:36:41 +0200] warn [cpsrvd] The subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi) exited with an error: The subprocess reported error number 2 when it ended. at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 155.
Cpanel::Server::Handlers::SubProcess::_report_subprocess_errors(Cpanel::Server::Handlers::SubProcess=HASH(0x2e962e0)) called at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 72
Cpanel::Server::Handlers::SubProcess::handler(Cpanel::Server::Handlers::SubProcess=HASH(0x2e962e0), CPANEL_HIDDEN, CPANEL_HIDDEN, CPANEL_HIDDEN, IO::Handle=GLOB(0x2ede590), CPANEL_HIDDEN, GLOB(0x2e96268)) called at cpsrvd.pl line 6307
cpanel::cpsrvd::cgiHandler(CPANEL_HIDDEN, CPANEL_HIDDEN, CPANEL_HIDDEN, CPANEL_HIDDEN) called at cpsrvd.pl line 5789
cpanel::cpsrvd::dodoc_whostmgrd() called at cpsrvd.pl line 1674
cpanel::cpsrvd::dodoc(HASH(0xedd770)) called at cpsrvd.pl line 1347
cpanel::cpsrvd::handle_one_connection() called at cpsrvd.pl line 841
cpanel::cpsrvd::script() called at cpsrvd.pl line 334

I tried to comment some webmin lines without results.
Please a solution thank you.

Hello,

it seems cPanel updated perl modules
please check if cpanel has Comodo content inside of dirs:

/opt/cpanel/perl5/514/site_lib/*
/opt/cpanel/perl5/522/site_lib/*

Similar problem is discussed here https://forums.comodo.com/free-modsecurity-rules-comodo-web-application-firewall/500-internal-server-error-t115361.0.html

i already copied this.
This error exists since cwaf included webmin.
I had a temporary fix for this, but now it doesnt work.

It seems, cwaf have problems if more then one control panel is installed.
In my case cPanel and webmin are installed.

We’ve never used more than one WHMS on the same server. I’ll try to use plugin with more than one WHMS, but I need some time.

I reproduced this issue. To use cPanel and WebMin simultaneously I edited /opt/cpanel/perl5/522/site_lib/Comodo/CWAF/Main.pm, where the string


sub is_webmin { return (-e  '/etc/webmin/miniserv.conf'); }

was replaced by


sub is_webmin { return 0; }

It fixed the problem, but as I see your logs the problem is not only with Webmin. I mean
“Undefined subroutine &main::is_standalone called at /usr/local/cpanel/whostmgr/cgi/cwaf_sharedlib.pl line 138.” It concerns Standalone mode.

Please, try to reinstall plugin for cPanel and check errors.

thanks for help.
I uninstalled cwaf and removed then old files manually and did a fresh install.

Now, same white page but with this error:

Can’t use string (“0”) as an ARRAY ref while “strict refs” in use at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Comodo/CWAF/Webmin.pm line 114.
[2016-07-05 10:44:03 +0200] warn [cpsrvd] The subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi) exited with an error: The subprocess reported error number 25 when it ended. at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 155.
Cpanel::Server::Handlers::SubProcess::_report_subprocess_errors(Cpanel::Server::Handlers::SubProcess=HASH(0x316fbd8)) called at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 72

this line is:
///
113 my $domains = &wm_get_domainlist();
114 my $dc = scalar [at]$domains;
115 $info->{‘vhosts_count’} = $dc ? $dc : “no”;

ps: line 114 there is a “at” character , forum converted it automatically to word

Great!
I got the same error. So, please, use my advice above.
The path to Main.pm may differ.

I had already changed it, but without effects,
because i must change it in /usr/local/cpanel/…
instead in /opt/…

now it works, thank you very much ! :azn: