Control Web Panel

WebPanel => CentOS-WebPanel Bugs => Topic started by: Wonder on November 21, 2026, 12:23:02 AM

Title: CWP LTS: PHP 8.3.37 PCRE2 & ionCube Issues
Post by: Wonder on November 21, 2026, 12:23:02 AM
Hi everyone,

Yesterday my CWP panel stopped working after an automatic update of its internal PHP. The websites and mail services were unaffected, but the panel became inaccessible.

My server:

AlmaLinux 8.10
CWP LTS 1.30.31 (current version)
cwpsrv 1.30.6
cwpphp 8.3.37 (previously 8.3.36)
ionCube Loader 15.5.0
PCRE2 10.32 (system) / 10.39 (/usr/local/lib)

The panel displayed:

No Loader is installed, please try to run this command or contact support:
sh /scripts/update_ioncube restart

I tried both suggested repair commands:

sh /scripts/update_ioncube restart
sh /scripts/update_cwp

Neither fixed the issue. The second command rebuilt PCRE2 with JIT but still reported:

panel PHP pcre still failing

DNF history showed that cwpphp was automatically upgraded from 8.3.36 to 8.3.37 on November 20 at 20:43 CET. This matches CWP's maintenance cron schedule (every four hours at minute 43), although I can't confirm that it triggered the update.

After investigating, I found that PHP 8.3.37 was loading PCRE2 10.32 from /lib64 instead of 10.39 from /usr/local/lib.

Testing the same PHP executable:

Default PCRE2 10.32:
preg_match("/test/", "test") => bool(false)
Warning: unrecognised compile-time option bit(s)

With LD_LIBRARY_PATH=/usr/local/lib:
PCRE2 10.39
preg_match("/test/", "test") => int(1)

I also found that ionCube was installed but not enabled in the panel's php.ini.

To recover the panel, I added this to /usr/local/cwp/php71/php.ini:

zend_extension=/usr/local/ioncube/ioncube_loader_lin_8.3.so

I then created systemd drop-ins for cwpsrv-phpfpm and cwp-phpfpm, both containing:

[Service]
Environment="LD_LIBRARY_PATH=/usr/local/lib"

After reloading systemd and restarting only those two PHP-FPM services, the panel worked again. No server reboot or system library replacement was necessary.

However, the SSL cron jobs were still failing with PCRE2 errors:

preg_replace(): Compilation failed
Incorrect config file

I had to add LD_LIBRARY_PATH=/usr/local/lib to both root cron entries:

cron_autossl_all_domains.php (00:50)
alertandautorenewssl.php (00:30)

I also added the same environment variable to /etc/cron.d/cwp.sh, which runs CWP's internal maintenance cron every four hours.

The PHP and ionCube tests now pass, and the panel is working again. The scheduled SSL tasks still need to be verified.

One additional detail: LFD reported MD5 changes in pcre2grep and pcre2test after update_cwp rebuilt PCRE2. Their timestamps match that rebuild.

I've seen the recent CWP changelog fixes for PCRE2 and ionCube, but they don't seem to have fully resolved this issue on AlmaLinux 8.10.

Is there an official fix that corrects the PHP library selection for both PHP-FPM and CLI, without manually modifying systemd services and cron jobs? I'm also concerned that a future automatic update might undo these workarounds.

I hope this helps anyone experiencing the same issue.

Thanks in advance!

Update:
Just a quick update. Unfortunately, I've found another problem with the CWP updater.

After recovering the panel, I ran `sh /scripts/update_cwp` again to check whether the issue had been resolved.

It still fails.

First, it tries to rebuild PCRE2:

panel PHP cannot use pcre with /usr/local/lib/libpcre2-8.so.0 - rebuilding pcre2 with JIT
pcre2 rebuilt with JIT
panel PHP pcre still failing

Then CWP runs its internal cron.php, producing several preg_match(), preg_replace() and preg_split() errors before crashing:

PHP Fatal error: Uncaught TypeError:
in_array(): Argument #2 ($haystack) must be of type array, false given
in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mail.php

The updater then reports:

update_cwp: cron.php fatal on an inconsistent panel code set - re-laying the panel code to recover

And finishes with the same ionCube error.

**But here's the important part: the CWP panel is now inaccessible again.**

I checked the configuration and found that update_cwp had removed the ionCube directive I previously added to:

/usr/local/cwp/php71/php.ini

The directive was:

zend_extension=/usr/local/ioncube/ioncube_loader_lin_8.3.so

The systemd drop-ins for both PHP-FPM services are still present, and the LD_LIBRARY_PATH settings in my cron jobs have also been preserved.

So the updater not only fails to repair PCRE2, but also appears to overwrite php.ini, removing the working ionCube configuration and breaking the panel again.

This is now reproducible on my server.

Could the developers please investigate this? The update/repair procedure itself seems to be causing the panel to become inaccessible again.

One more detail I forgot to mention: my panel is currently on CWP LTS 1.30.31, and I haven't been able to get it to update successfully.

Every time I run `sh /scripts/update_cwp`, it reports the PCRE2 errors mentioned above, fails while executing `cron.php`, and removes the ionCube configuration from `php.ini`, leaving the panel inaccessible again.

I can recover access by restoring the ionCube directive and restarting the two PHP-FPM services, but this doesn't fix the updater itself.

I'm not sure whether a newer LTS version is currently available for my installation, but the update process clearly isn't completing correctly.

Is there an official way to repair the updater without reinstalling CWP or risking the existing configuration?
Title: Re: CWP LTS: PHP 8.3.37 PCRE2 & ionCube Issues
Post by: Wonder on November 21, 2026, 01:05:07 AM
Good news! I've finally managed to resolve the issue, and I wanted to share what I found in case it helps anyone else.

I compared two servers running AlmaLinux 8.10 and CWP LTS, both using the same CWP repository.

The first server had successfully updated to CWP LTS 1.30.32 and was still using cwpphp 8.3.36. Everything worked correctly.

The second server was stuck on CWP LTS 1.30.31 after automatically installing cwpphp 8.3.37-1.el8, which caused the PCRE2 and ionCube problems described earlier.

Both servers had the same system PCRE2 version (10.32), but PHP behaved differently:

Server 1:
CWP LTS 1.30.32
cwpphp 8.3.36-1
PCRE2 10.32
preg_match() => int(1)

Server 2 (affected):
CWP LTS 1.30.31
cwpphp 8.3.37-1.el8
PCRE2 10.32
preg_match() => bool(false)

I also discovered that the two servers were using different revisions of the CWP repository metadata, despite having exactly the same repository URL. The first server only listed cwpphp 8.3.36, while the second already listed a newer package, cwpphp 8.3.37-2.el8.

That gave me an idea: instead of trying to repair CWP again, I downloaded and installed the newer cwpphp package directly using DNF.

dnf upgrade -y cwpphp-8.3.37-2.x86_64.rpm

And that was the solution!

After installing cwpphp 8.3.37-2.el8, PHP worked correctly with the system PCRE2 10.32 library, without LD_LIBRARY_PATH or any other workaround:

PHP 8.3.37
PCRE2 10.32
preg_match() => int(1)
ionCube PHP Loader v15.5.1

I then ran:

sh /scripts/update_cwp

This time it completed without the previous PCRE2, ionCube or PHP fatal errors, and CWP successfully updated from LTS 1.30.31 to 1.30.32.

Finally, I removed all the temporary LD_LIBRARY_PATH workarounds from both PHP-FPM systemd services, restored the original AutoSSL cron entries and restored /etc/cron.d/cwp.sh.

Everything is now back to its normal configuration:

AlmaLinux 8.10
CWP LTS 1.30.32
cwpphp 8.3.37-2.el8
cwpsrv 1.30.6
PCRE2 10.32 (system)
ionCube Loader 15.5.1

The panel is accessible, all CWP services are running, PHP works without warnings, and there is only one active ionCube configuration. No server reboot was necessary.

The scheduled AutoSSL jobs still need to complete their next normal runs, but their original cron configurations have been restored.

Based on these tests, it looks like cwpphp 8.3.37-1.el8 introduced the incompatibility and 8.3.37-2.el8 corrected it.

Hopefully this helps anyone who encounters the same issue. Thanks!