Description
It all started after some ioncube issues, but i updated to latest version, but still not online with CP. Webserver working fine - but cp down.
I tried all these commands:
… even did a upcp -sbf . It still fails!
cd /usr/local/apnscp
upcp -sbf php/install-extensions --var=force_module_rebuild=true
[root@node02 apnscp]# /usr/local/apnscp/bin/apnscpd -f
(Exception) INTERNAL REPORT: ArgumentCountError::__set_state(array(
'message' => 'strrchr() expects exactly 2 arguments, 3 given',
'string' => '',
'code' => 0,
'file' => '/usr/local/apnscp/lib/Opcenter/Dbus/Systemd.php',
'line' => 111,
'trace' =>
array (
0 =>
array (
'file' => '/usr/local/apnscp/lib/Opcenter/Dbus/Systemd.php',
'line' => 111,
'function' => 'strrchr',
'args' =>
array (
0 => 'apiscp.service',
1 => '.',
2 => true,
),
),
1 =>
array (
'file' => '/usr/local/apnscp/lib/Opcenter/Dbus/Systemd.php',
'line' => 39,
'function' => 'templated',
'class' => 'Opcenter\\Dbus\\Systemd',
'type' => '->',
'args' =>
array (
0 => 'apiscp.service',
),
),
2 =>
array (
'file' => '/usr/local/apnscp/lib/Opcenter/Dbus/Systemd.php',
'line' => 91,
'function' => 'unitToObject',
'class' => 'Opcenter\\Dbus\\Systemd',
'type' => '->',
'args' =>
array (
0 => 'apiscp.service',
1 => true,
),
),
3 =>
array (
'file' => '/usr/local/apnscp/lib/Opcenter/System/GenericSystemdService.php',
'line' => 198,
'function' => 'exists',
'class' => 'Opcenter\\Dbus\\Systemd',
'type' => '->',
'args' =>
array (
0 => 'apiscp',
),
),
4 =>
array (
'file' => '/usr/local/apnscp/lib/Opcenter/System/GenericSystemdService.php',
'line' => 92,
'function' => 'exists',
'class' => 'Opcenter\\System\\GenericSystemdService',
'type' => '::',
'args' =>
array (
),
),
5 =>
array (
'file' => '/usr/local/apnscp/lib/lservicelib8.pht',
'line' => 205,
'function' => 'reset',
'class' => 'Opcenter\\System\\GenericSystemdService',
'type' => '::',
'args' =>
array (
),
),
6 =>
array (
'file' => '/usr/local/apnscp/lib/lservicelib8.pht',
'line' => 170,
'function' => 'start',
'class' => 'ListenerService\\Daemon',
'type' => '->',
'args' =>
array (
),
),
7 =>
array (
'file' => '/usr/local/apnscp/lib/lservicelib8.pht',
'line' => 1466,
'function' => '__construct',
'class' => 'ListenerService\\Daemon',
'type' => '->',
'args' =>
array (
),
),
8 =>
array (
'file' => '/usr/local/apnscp/lib/lservice.php',
'line' => 28,
'function' => 'init',
'class' => 'ListenerService\\Daemon',
'type' => '::',
'args' =>
array (
),
),
),
'previous' => NULL,
))
0B. Error_Reporter::report("ArgumentCountError::__set_state(array( 'message' => 'strrchr() expects exactly 2 arguments, 3 given', 'string' => '', 'code' => 0, 'file' => '/usr/local/apnscp/lib/Opcenter/Dbus/Systemd.php', 'line' => 111, 'trace' => array ( 0 => array ( 'file' => '/usr/local/apnscp/lib/Opcenter/Dbus/Systemd.php', 'line' => 111, 'function' => 'strrchr', 'args' => array ( 0 => 'apiscp.service', 1 => '.', 2 => true, ), ), 1 => array ( 'file' => '/usr/local/apnscp/lib/Opcenter/Dbus/Systemd.php', 'line' => 39, 'function' => 'templated', 'class' => 'Opcenter\\Dbus\\Systemd', 'type' => '->', 'args' => array ( 0 => 'apiscp.service', ), ), 2 => array ( 'file' => '/usr/local/apnscp/lib/Opcenter/Dbus/Systemd.php', 'line' => 91, 'function' => 'unitToObject', 'class' => 'Opcenter\\Dbus\\Systemd', 'type' => '->', 'args' => array ( 0 => 'apiscp.service', 1 => true, ), ), 3 => array ( 'file' => '/usr/local/apnscp/lib/Opcenter/System/GenericSystemdService.php', 'line' => 198, 'function' => 'exists', 'class' => 'Opcenter\\Dbus\\Systemd', 'type' => '->', 'args' => array ( 0 => 'apiscp', ), ), 4 => array ( 'file' => '/usr/local/apnscp/lib/Opcenter/System/GenericSystemdService.php', 'line' => 92, 'function' => 'exists', 'class' => 'Opcenter\\System\\GenericSystemdService', 'type' => '::', 'args' => array ( ), ), 5 => array ( 'file' => '/usr/local/apnscp/lib/lservicelib8.pht', 'line' => 205, 'function' => 'reset', 'class' => 'Opcenter\\System\\GenericSystemdService', 'type' => '::', 'args' => array ( ), ), 6 => array ( 'file' => '/usr/local/apnscp/lib/lservicelib8.pht', 'line' => 170, 'function' => 'start', 'class' => 'ListenerService\\Daemon', 'type' => '->', 'args' => array ( ), ), 7 => array ( 'file' => '/usr/local/apnscp/lib/lservicelib8.pht', 'line' => 1466, 'function' => '__construct', 'class' => 'ListenerService\\Daemon', 'type' => '->', 'args' => array ( ), ), 8 => array ( 'file' => '/usr/local/apnscp/lib/lservice.php', 'line' => 28, 'function' => 'init', 'class' => 'ListenerService\\Daemon', 'type' => '::', 'args' => array ( ), ), ), 'previous' => NULL,))", ["ArgumentCountError::__set_state(array( 'message' => 'strrchr() expects exactly 2 arguments, 3 given', 'string' => '', 'code' => 0, 'file' => '/usr/local/apnscp/lib/Opcenter/Dbus/Systemd.php', 'line' => 111, 'trace' => array ( 0 => array ( 'file' => '/usr/local/apnscp/lib/Opcenter/Dbus/Systemd.php', 'line' => 111, 'function' => 'strrchr', 'args' => array ( 0 => 'apiscp.service', 1 => '.', 2 => true, ), ), 1 => array ( 'file' => '/usr/local/apnscp/lib/Opcenter/Dbus/Systemd.php', 'line' => 39, 'function' => 'templated', 'class' => 'Opcenter\\Dbus\\Systemd', 'type' => '->', 'args' => array ( 0 => 'apiscp.service', ), ), 2 => array ( 'file' => '/usr/local/apnscp/lib/Opcenter/Dbus/Systemd.php', 'line' => 91, 'function' => 'unitToObject', 'class' => 'Opcenter\\Dbus\\Systemd', 'type' => '->', 'args' => array ( 0 => 'apiscp.service', 1 => true, ), ), 3 => array ( 'file' => '/usr/local/apnscp/lib/Opcenter/System/GenericSystemdService.php', 'line' => 198, 'function' => 'exists', 'class' => 'Opcenter\\Dbus\\Systemd', 'type' => '->', 'args' => array ( 0 => 'apiscp', ), ), 4 => array ( 'file' => '/usr/local/apnscp/lib/Opcenter/System/GenericSystemdService.php', 'line' => 92, 'function' => 'exists', 'class' => 'Opcenter\\System\\GenericSystemdService', 'type' => '::', 'args' => array ( ), ), 5 => array ( 'file' => '/usr/local/apnscp/lib/lservicelib8.pht', 'line' => 205, 'function' => 'reset', 'class' => 'Opcenter\\System\\GenericSystemdService', 'type' => '::', 'args' => array ( ), ), 6 => array ( 'file' => '/usr/local/apnscp/lib/lservicelib8.pht', 'line' => 170, 'function' => 'start', 'class' => 'ListenerService\\Daemon', 'type' => '->', 'args' => array ( ), ), 7 => array ( 'file' => '/usr/local/apnscp/lib/lservicelib8.pht', 'line' => 1466, 'function' => '__construct', 'class' => 'ListenerService\\Daemon', 'type' => '->', 'args' => array ( ), ), 8 => array ( 'file' => '/usr/local/apnscp/lib/lservice.php', 'line' => 28, 'function' => 'init', 'class' => 'ListenerService\\Daemon', 'type' => '::', 'args' => array ( ), ), ), 'previous' => NULL,))"])
[/usr/local/apnscp/lib/apnscpcore.php:145]
1B. Error_Reporter\ReportFilterInterface@anonymous/usr/local/apnscp/lib/apnscpcore.php:135$1->filter(128, "strrchr() expects exactly 2 arguments, 3 given", "/usr/local/apnscp/lib/Opcenter/Dbus/Systemd.php", 111, ArgumentCountError)
[/usr/local/apnscp/lib/error_reporter.php:253]
2B. Error_Reporter::handle_error(128, "strrchr() expects exactly 2 arguments, 3 given", "/usr/local/apnscp/lib/Opcenter/Dbus/Systemd.php", 111, ArgumentCountError)
[/usr/local/apnscp/lib/error_reporter.php:160]
3B. Error_Reporter::handle_exception(ArgumentCountError)
[n/a]
[root@node02 apnscp]# systemctl status apiscp
● apnscp.service - ApisCP backend service
Loaded: loaded (/etc/systemd/system/apnscp.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/apnscp.service.d
└─override.conf
Active: failed (Result: exit-code) since Thu 2025-09-18 01:55:40 CEST; 2min 3s ago
Process: 241766 ExecStopPost=/usr/sbin/httpd -f /usr/local/apnscp/config/httpd.conf -k stop $HTTPD_ARGS (code=exited, status=0/SUCCESS)
Process: 241755 ExecStart=/usr/local/apnscp/bin/apnscpd start (code=exited, status=255)
Main PID: 241755 (code=exited, status=255)
Status: "Detaching"
Tasks: 4 (limit: 809224)
Memory: 17.3M
CGroup: /system.slice/apnscp.service
└─7408 redis-server 127.0.0.1:0
Sep 18 01:55:40 node02.domain.com systemd[1]: Starting ApisCP backend service...
Sep 18 01:55:40 node02.domain.com systemd[1]: apnscp.service: Supervising process 241755 which is not our child. We'll most likely not notice when it exits.
Sep 18 01:55:40 node02.domain.com systemd[1]: apnscp.service: Main process exited, code=exited, status=255/n/a
Sep 18 01:55:40 node02.domain.com httpd[241766]: httpd (no pid file) not running
Sep 18 01:55:40 node02.domain.com systemd[1]: apnscp.service: Failed with result 'exit-code'.
Sep 18 01:55:40 node02.domain.com systemd[1]: Failed to start ApisCP backend service.
[root@node02 apnscp]#
Environment
ApisCP version: cpcmd misc:cp-version - Can’t run this cmd or other APISCP due to down.
Operating System: uname -r - 4.18.0-553.72.1.el8_10.x86_64
[root@node02 apnscp]# php -v
PHP 8.2.29 (cli) (built: Sep 1 2025 01:50:55) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.29, Copyright (c) Zend Technologies
with the ionCube PHP Loader v14.4.1, Copyright (c) 2002-2025, by ionCube Ltd.
with Zend OPcache v8.2.29, Copyright (c), by Zend Technologies
Additional Information
I suspect some php extension to be the first root cause to all this. They have been removed but new issues appeared with ioncube (saw a thread and did same cmds) - but seems like something is still broken. I am on latest version - did this:
cd /usr/local/apnscp
git checkout master
systemctl restart apiscp - *fails*
Hmmm…:
[root@node02 bin]# php -i | grep -i ioncube
Additional .ini files parsed => /etc/php82.d/00-ioncube.ini,
with the ionCube PHP Loader v14.4.1, Copyright (c) 2002-2025, by ionCube Ltd.
ionCube Loader
For Loader updates visit www.ioncube.com/loaders.php
For support visit support.ioncube.com
ioncube.loader.encoded_paths => no value => no value
[root@node02 bin]# cd /usr/local/apnscp/sys/php/20210902/
[root@node02 20210902]# ll
total 13784
-rwxr-xr-x 1 apnscp root 708608 Sep 18 02:07 apcu.so
-rwxr-xr-x 1 root root 287968 Sep 18 02:32 dbus.so
-rwxr-xr-x 1 apnscp root 559776 Sep 18 02:07 igbinary.so
-rw-r--r-- 1 apnscp apnscp 1503080 **May 21 11:42** ioncube_loader_lin_8.1.so
-rwxr-xr-x 1 apnscp root 7243640 Sep 18 02:07 opcache.so
-rwxr-xr-x 1 apnscp root 3803824 Sep 18 02:07 redis.so
[root@node02 20210902]# cat /etc/php82.d/00-ioncube.ini
zend_extension="/usr/lib64/20220829/ioncube_loader_lin_8.2.so"
[root@node02 20210902]# php -v
PHP 8.2.29 (cli) (built: Sep 18 2025 02:05:52) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.29, Copyright (c) Zend Technologies
with the ionCube PHP Loader v14.4.1, Copyright (c) 2002-2025, by ionCube Ltd.
with Zend OPcache v8.2.29, Copyright (c), by Zend Technologies
[root@node02 20210902]#