PHP Fatal - Too few arguments to function Horde_ErrorHandler::errorHandler()

Here are some helpful considerations when filing a bug:

  • What version of apnscp are you running?
# cpcmd misc_cp_version
revision: 91d7826ed87b2a422ac58fc1eb4d6db70cb0da7e
timestamp: 1732333578
ver_maj: 3
ver_min: 2
ver_patch: 45
ver_pre: ''
dirty: false
debug: false
  • Which version of RHEL or CentOS are you using?
# cat /etc/redhat-release
Rocky Linux release 8.10 (Green Obsidian)
# uname -a
Linux myhost.example.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Wed Sep 25 09:20:43 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
  • Description

After new deployment of ApisCP and transferring/migrating sites from another (fully up-to-date) ApisCP host, I’m now getting the below Cron error email every 5 minutes.

  • Cron Error Emails:
    Subject: Cron apnscp@myhost /usr/bin/horde-alarms
    Message:
PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ArgumentCountError: Too few arguments to function Horde_ErrorHandler::errorHandler(), 4 passed in /.socket/php/pear/Horde/Registry/Hordeconfig.php on line 24 and exactly 5 expected in /.socket/php/pear/Horde/ErrorHandler.php:153
Stack trace:
#0 /.socket/php/pear/Horde/Registry/Hordeconfig.php(24): Horde_ErrorHandler::errorHandler(8192, 'Return type of ...', '/.socket/php/pe...', 90)
#1 /.socket/php/pear/Horde/Autoloader.php(128): include('/.socket/php/pe...')
#2 /.socket/php/pear/Horde/Autoloader.php(65): Horde_Autoloader->_include('/.socket/php/pe...')
#3 /.socket/php/pear/Horde/Registry.php(1763): Horde_Autoloader->loadClass('Horde_Registry_...')
#4 /.socket/php/pear/Horde/Registry.php(480): Horde_Registry->importConfig('horde')
#5 /.socket/php/pear/Horde/Registry.php(287): Horde_Registry->__construct(0, Array)
#6 /usr/bin/horde-alarms(23): Horde_Registry::appInit('horde', Array)
#7 {main} in /.socket/php/pear/Horde/Registry/Hordeconfig.php on line 24

  Fatal Error:
  During inheritance of ArrayAccess: Uncaught ArgumentCountError: Too few
     arguments to function Horde_ErrorHandler::errorHandler(), 4 passed in
     /.socket/php/pear/Horde/Registry/Hordeconfig.php on line 24 and exactly 5
     expected in /.socket/php/pear/Horde/ErrorHandler.php:153
  Stack trace:
  #0 /.socket/php/pear/Horde/Registry/Hordeconfig.php(24):
     Horde_ErrorHandler::errorHandler(8192, 'Return type of ...',
     '/.socket/php/pe...', 90)
  #1 /.socket/php/pear/Horde/Autoloader.php(128):
     include('/.socket/php/pe...')
  #2 /.socket/php/pear/Horde/Autoloader.php(65):
     Horde_Autoloader->_include('/.socket/php/pe...')
  #3 /.socket/php/pear/Horde/Registry.php(1763):
     Horde_Autoloader->loadClass('Horde_Registry_...')
  #4 /.socket/php/pear/Horde/Registry.php(480):
     Horde_Registry->importConfig('horde')
  #5 /.socket/php/pear/Horde/Registry.php(287):
     Horde_Registry->__construct(0, Array)
  #6 /usr/bin/horde-alarms(23): Horde_Registry::appInit('horde', Array)
  #7 {main}
  In /.socket/php/pear/Horde/Registry/Hordeconfig.php on line 24

  1. Horde_ErrorHandler::catchFatalError()

Pretty sure Horde is kinda dead and not supporting PHP 8, which should be base version on Apis. I’d suggest you to disable it on both nodes, and maybe attempt transferring the site again if you ran into errors…

cpcmd scope:set cp.bootstrapper horde_enabled false
upcp -sbf mail/webmail-horde