Softaculous Cron Job Errors with Perl 5.8

aUserName

Member
Sep 15, 2016
15
6
53
Tubes
cPanel Access Level
Root Administrator
Recently started getting error notices from user-created cron jobs, which are generated by Softaculous for software installed by Softaculous.

The errors started on 8/24/2017 and are most likely brought on by automatic updates. I'm posting about this here in case anyone else comes searching for the same errors. Softaculous might be jumping the gun for some people who don't have access to Perl 5.10+ just yet (our server is currently locked to 5.8, no updates available.) However, I assume sometime in the near future cPanel will require version 5.10+ and we'll be allowed the updates that will fix this error.

The errors I get are as follows:
Search pattern not terminated at /usr/local/cpanel/Cpanel/Config/Httpd/EA4.pm line 46.
Compilation failed in require at /usr/local/cpanel/Cpanel/Config/Httpd.pm line 11.
BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/Config/Httpd.pm line 11.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
The file is loaded by the Softaculous cron job file, on my server the cron job is usually like this:
/usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/cli.php --backup --auto=1 --insid=XX_YYYYY

The problem file contains an operator that is not available in Perl until version 5.10, which is a new take the OR operator, I think..
To fix the errors and get Softaculous cron jobs working again, I have changed the following line from:
Code:
return $is_ea4_cached //= _is_ea4();
To:
Code:
return $is_ea4_cached ||= _is_ea4();
I'm not a guru of Perl, so this could be wrong. Use at your own risk. Also feel free to educate me if this "fix" is not as straight forward as it would appear to be to me.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463

aUserName

Member
Sep 15, 2016
15
6
53
Tubes
cPanel Access Level
Root Administrator
I wouldn't say this is solved yet. The fix is only a patch, it gets wiped out with any update to cpanel.
The problem file is listed in the error message as "/usr/local/cpanel/Cpanel/Config/Httpd/EA4.pm" line number 46. This needs to be patched officially before it can be considered solved.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

Have you reported this issue to the Softaculous support team? This seems like something they'd need to fix in their application.

Thank you.
 

aUserName

Member
Sep 15, 2016
15
6
53
Tubes
cPanel Access Level
Root Administrator
I have.
It has been a bit of a complicated issue but between their support services, my host provider support department, and cpanel support team, the issue was finally figured out.

I'm still not so sure why the system indicated the perl 5.10 package was installed as it was unable to be updated due to a setting in /etc/yum.conf that prevented any perl package from being installed or updated. Since we already had perl 5.8.8 some things worked and some things did not when the minimum version changed.

When I reported this issue I was not sure who's problem it was. I only noticed the errors when softaculous cron jobs run because softaculous is one of few WHM/cPanel addons that uses the system perl installation rather than the one packaged with/by cPanel. We don't customize for permanence if the package manger(s) wont do it for us, so I assumed we were getting all updates as normal.

First I saw the error and figured it would be patched soon, some edge-case bug, made a patch myself for the mean time.
Didn't get patched, opened a ticket with Softaculous, they asked what file it was in and I realized it was definitely not their issue as the file is owned by cPanel.
Originally I was thinking "they just forgot to support servers still using 5.8" until I read the documentation pages which listed the minimum perl version by OS version. (REHL 6 = perl 5.10)
Opened a ticket with IMH support, they tell me "we can't support using a version of perl that isn't the default" even though I've explained the current default is 5.10 which wasn't installed/working correctly (a misunderstanding or lazy crock-o-crap don't really know.)
Opened a ticket with cPanel support. They fixed it up quick! :)
 
  • Like
Reactions: cPanelMichael