Failed loading /usr/lib64/20210902/ioncube_loader_lin_8.1.so

I had this problem when I originally set the server up and everything was fine until recently. It’s a little different now in that ioncube was only failing on one site and this time it’s multiple.

[root@starfish html]# php -v
PHP 8.1.31 (cli) (built: Dec  1 2024 00:59:39) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.31, Copyright (c) Zend Technologies
    with the ionCube PHP Loader v14.0.0, Copyright (c) 2002-2024, by ionCube Ltd.
    with Zend OPcache v8.1.31, Copyright (c), by Zend Technologies

User Account:

[chzeman@starfish /]$ php -v
Failed loading /usr/lib64/20210902/ioncube_loader_lin_8.1.so:  /usr/lib64/20210902/ioncube_loader_lin_8.1.so: cannot open shared object file: Too many levels of symbolic links
Failed loading /usr/lib64/20210902/opcache.so:  /usr/lib64/20210902/opcache.so: cannot open shared object file: Too many levels of symbolic links
PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib64/20210902/imagick.so (/usr/lib64/20210902/imagick.so: cannot open shared object file: Too many levels of symbolic links), /usr/lib64/20210902/imagick.so.so (/usr/lib64/20210902/imagick.so.so: cannot open shared object file: Too many levels of symbolic links)) in Unknown on line 0
PHP 8.1.31 (cli) (built: Dec  1 2024 00:59:39) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.31, Copyright (c) Zend Technologies

I’ve been through the solution that fixed it before and all of the suggested solutions but I’m not having any luck fixing this.

Then I did the following with the shown result…

[root@starfish ~]# upcp -sbfvvv apnscp/php-filesystem-template
...
TASK [apnscp/php-filesystem-template : Link system extension directory to socket] *********************************************************
task path: /usr/local/apnscp/resources/playbooks/roles/apnscp/php-filesystem-template/tasks/populate-php-fst.yml:115
Using module file /usr/lib/python3.6/site-packages/ansible/modules/files/file.py
Pipelining is enabled.
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c '/usr/libexec/platform-python && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": false,
    "gid": 0,
    "group": "root",
    "invocation": {
        "module_args": {
            "_diff_peek": null,
            "_original_basename": null,
            "access_time": null,
            "access_time_format": "%Y%m%d%H%M.%S",
            "attributes": null,
            "backup": null,
            "content": null,
            "delimiter": null,
            "directory_mode": null,
            "follow": true,
            "force": false,
            "group": null,
            "mode": null,
            "modification_time": null,
            "modification_time_format": "%Y%m%d%H%M.%S",
            "owner": null,
            "path": "/home/virtual/FILESYSTEMTEMPLATE/siteinfo/usr/lib64/20210902",
            "recurse": false,
            "regexp": null,
            "remote_src": null,
            "selevel": null,
            "serole": null,
            "setype": null,
            "seuser": null,
            "src": "/.socket/php/usr/lib64/20210902",
            "state": "link",
            "unsafe_writes": false
        }
    },
    "mode": "0777",
    "msg": "src file does not exist, use \"force=yes\" if you really want to create the link: /.socket/php/usr/lib64/20210902",
    "owner": "root",
    "path": "/home/virtual/FILESYSTEMTEMPLATE/siteinfo/usr/lib64/20210902",
    "size": 19,
    "src": "/.socket/php/usr/lib64/20210902",
    "state": "link",
    "uid": 0
}

PLAY RECAP ********************************************************************************************************************************
localhost                  : ok=25   changed=0    unreachable=0    failed=1    skipped=10   rescued=0    ignored=0

Environment

ApisCP version: cpcmd misc:cp-version

revision: 3ec2e7884c258580fa707cfe827a4269861007c6
timestamp: 1730519492
ver_maj: 3
ver_min: 2
ver_patch: 45
ver_pre: ''
dirty: false
debug: false

Operating System: uname -r

4.18.0-513.9.1.el8_9.x86_64
AlmaLinux release 8.9 (Midnight Oncilla)

Thank you,
Chris

Smells like a backdated platform through no fault of your own.

What does “upcp” report?

If this fails what does this report?

upcp --reset
cd /usr/local/apnscp
git describe
[root@starfish ~]# upcp
Updating to v3.2.45
Previous HEAD position was 5723928cb FIX: forward reload parameters to base module (Null) FIX: add()- pop3 service flag ignored (user)
HEAD is now at b36a59c8f CHG: perform second pass scrub on direct filesystem (reissueAllCertificates) CHG: import matching CA into internal Let's Encrypt renweal registry (Formats\Cpanel) CHG: reimport missing Let's Encrypt certificates issued since June (migrations)
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 0 installs, 0 updates, 3 removals
  - Removing chillerlan/php-settings-container (2.1.6)
  - Removing chillerlan/php-qrcode (5.0.2)
  - Removing chillerlan/php-authenticator (4.3.1)
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package true/punycode is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
90 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Compiled services and packages files removed!
Nothing to migrate.
Nothing to migrate.
Updating to v3.2.45.1
Previous HEAD position was b36a59c8f CHG: perform second pass scrub on direct filesystem (reissueAllCertificates) CHG: import matching CA into internal Let's Encrypt renweal registry (Formats\Cpanel) CHG: reimport missing Let's Encrypt certificates issued since June (migrations)
HEAD is now at 181491181 CHG: callback order cannot be determined. Perform validity self-check before firing cleanup callbacks (Webapps) REM: deprecated utf8_decode usage (License)
Compiled services and packages files removed!
Nothing to migrate.
Nothing to migrate.
Updating to v3.2.45.2
Previous HEAD position was 181491181 CHG: callback order cannot be determined. Perform validity self-check before firing cleanup callbacks (Webapps) REM: deprecated utf8_decode usage (License)
HEAD is now at 3ec2e7884 FIX: workaround for X1 intermediate CA expiry. Introduce a 1 in 10 lottery to perform a license renewal whenever an authority is within 30 days of expiration. Coordination policy has changed to introduce a new CA approximately 90 days of expiration. Next CA rotation, X2, will occur before on or before August 2, 2027. Licenses may be renewed before the automated license check using "bin/scripts/license.php renew --force" with ApisCP root. (License)
Compiled services and packages files removed!
Nothing to migrate.
Nothing to migrate.
[root@starfish ~]# upcp --reset
HEAD is now at 5723928cb FIX: forward reload parameters to base module (Null) FIX: add()- pop3 service flag ignored (user)
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 3 installs, 0 updates, 0 removals
  - Installing chillerlan/php-settings-container (2.1.6): Extracting archive
  - Installing chillerlan/php-authenticator (4.3.1): Extracting archive
  - Installing chillerlan/php-qrcode (5.0.2): Extracting archive
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package true/punycode is abandoned, you should avoid using it. No replacement was suggested.
...
Nothing to migrate.
Migrating: 2024_11_14_162936_platform-tweaks
...
[1/1] TASK [mail/configure-postfix : Create Postfix user] ****************************
changed: [localhost]
...
ok: [localhost] => (item=Set data_directory => /var/lib/postfix)
changed: [localhost] => (item=Set smtpd_tls_session_cache_database => )
changed: [localhost] => (item=Set smtp_tls_session_cache_database => btree:$data_directory/smtp_scache)
changed: [localhost] => (item=Set smtp_tls_session_cache_timeout => 1h)
...
ok: [localhost] => (item=Set postscreen_pipelining_action => drop)
changed: [localhost] => (item=Set address_verify_map => btree:/var/lib/postfix/verify_cache)
changed: [localhost] => (item=Set postscreen_cache_map => btree:/var/lib/postfix/postscreen_cache)
...
ok: [localhost] => (item=Set relayhost => [mail.smtp2go.com]:587)
changed: [localhost] => (item=Set sender_canonical_maps => proxy:pgsql:/etc/postfix/canonical_map_rewrite.cf,tcp:127.0.0.1:10001)
...
changed: [localhost] => (item=Setting /usr/local/apnscp/resources/playbooks/roles/software/tmpfiles/templates/apnscp.conf.j2)

RUNNING HANDLER [common : Restart postfix] *************************************
changed: [localhost]
[1/1] PLAY RECAP *********************************************************************
localhost                  : ok=45   changed=5    unreachable=0    failed=0    skipped=20   rescued=0    ignored=0
Migrated:  2024_11_14_162936_platform-tweaks
[root@starfish apnscp]# git describe
v3.2.45.2

Run the following commands:

rm -f /.socket/php/usr/lib64/20210902 /home/virtual/FILESYSTEMTEMPLATE/siteinfo/usr/lib64/20210902
upcp -sbf php/install apnscp/php-filesystem-template

Did you previously designate PHP 8.1 as a multiPHP build, then change it to become the system default (cpcmd scope:set php.version 8.1) and what’s the age of this system? I know issues similar to this occurred in the past but insofar I know, it’s since resolved.

Thank you, Matt!

I set this system up in June 2023 (18 months ago). It’s possible I designated 8.1 as a multiPHP build and changed it to the system default later, but that would have happened back then. I haven’t had to intervene with anything until now and everything was find until a few days ago.

It still wasn’t working after running the commands you gave me, including…

cpcmd admin:kill-site site12 ; systemctl restart fsmount

…but everything was find after a reboot.

I just have to figure out the imagick.so issue now. I saw some references and fixes to it in the forum and on Discord and will give those a try.

Thank you,
Chris