Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Watchdog

Pages: [1]
1
The official cwp7 module hasn't changed since 30 March 2020. WHMCS has shipped 15 releases since then and now requires PHP 8.2, so I rewrote it.

It's a drop-in replacement: same module name, same directory, same config option order. Existing server entries, products and services keep working with no reconfiguration.

https://github.com/bradleygb/whmcs-cwp-module



Why you'd switch

Running the 2020 module today, these are live faults, not style complaints:

  • Disk and bandwidth reporting has never worked. It matches tblhosting.dedicatedip against CWP's ip_address, but dedicatedip is empty for every shared-IP account, so the query matches no rows. It also writes lastupdate with date('Y-m-d H:i:S') - capital S is PHP's ordinal suffix, producing "14:30:th", which MySQL rejects.
  • Package changes don't work against current CWP. CWP has a dedicated /v1/changepack endpoint. The module posts to /v1/account with action=udp and the package suffixed "12@", where that endpoint documents a "@12" prefix. Nothing changes and WHMCS reports success.
  • Resource limits aren't applied. CWP's add endpoint wants limit_nofile and limit_nproc; account/udp wants openfiles and processes. The module sends nofile and nproc, which neither accepts, so every account gets its package defaults.
  • ChangePassword sends 'acction' instead of 'action'. The field never reaches CWP.
  • A fatal TypeError in your daily cron. count() is called on the API payload without checking it's an array - on PHP 8 that aborts the cron run.
  • The API key is written to the WHMCS Module Log in plaintext, and sent with CURLOPT_SSL_VERIFYPEER and VERIFYHOST both disabled.
  • A live autologin URL is minted on every product-details page load and printed into the page HTML, where it persists in page source, browser history and referrer headers.



What's in the rewrite

All of the above fixed. TLS verification on by default with optional certificate pinning. The API key masked in logs and stripped from CWP's own error text - CWP echoes it back inside "Unauthorized action". Autologin sessions minted on click through WHMCS single sign-on. Account creation given its own 180-second budget, and a creation that times out is reconciled rather than left as an orphaned account.

Added: MetaData, TestConnection, ServiceSingleSignOn, ListAccounts for Server Sync, live account detail on the admin service page, and a client area block that makes no API call while rendering - so an unreachable panel can't stall a customer's page.

Optionally, changing a service's Product/Service applies the package to CWP directly, with no second click.

Errors name the exact API Manager function and action when a permission is missing, which matters because CWP's internal permission names don't match its own labels - account/udp is checked as "accout_upd".



Requirements

WHMCS 8.5-9.0, PHP 7.4-8.3, curl and json. Tested on 7.4, 8.0, 8.1, 8.2 and 8.3. MIT licensed. Community module, not affiliated with the CWP project.

Install

Extract into modules/servers/ and press Test Connection. PERMISSIONS.md lists the exact API Manager grants - note the grid is per function and per action, and an action left off produces "Unauthorized action" even when the function looks enabled.

Upgrading: replace the directory contents, nothing else. One thing can stop a previously "working" install - TLS verification is now on. If CWP serves a certificate from a public CA on 2304 you're fine; if it's self-signed, the README covers pinning it.

Issues and pull requests welcome.

2
CentOS-WebPanel Bugs / dnf-automatic breaks postfix mysql maps on CWP
« on: August 01, 2026, 09:47:12 AM »
Heads up if you're running CWP with dnf-automatic installed for unattended updates: its first run silently swapped out CWP's custom-built postfix (compiled with MySQL support for virtual mailboxes) for the plain AlmaLinux baseos version, which doesn't have MySQL map support at all.

Code: [Select]
Transaction ID : 109
Begin time     : Sat Aug  1 06:30:15 2026
Begin rpmdb    : 905:a10ef5d78fa6d306985452fba3dac5db0cadc780
End time       : Sat Aug  1 06:30:22 2026 (7 seconds)
End rpmdb      : 905:5eb23852bf03e3fd7f4f1d08e2025cd84452d170
User           : System <unset>
Return-Code    : Success
Releasever     : 8
Command Line   :
Comment        :
Packages Altered:
    Upgrade  MariaDB-shared-10.11.18-1.el8.x86_64                      @mariadb
    Upgraded MariaDB-shared-10.5.29-1.el8.x86_64                       @@System
    Upgrade  galera-4-26.4.27-1.el8.x86_64                             @mariadb
    Upgraded galera-4-26.4.22-1.el8.x86_64                             @@System
    Upgrade  postfix-2:3.5.8-8.el8_10.x86_64                           @baseos
    Upgraded postfix-2:3.4.8-2.centos.8+p18.0.24.0+t200128.1353.x86_64 @@System

Mail started failing with "temporary lookup failure" on every message needing a virtual alias lookup.

Fixed it by finding the transaction(In my case 109) that did the swap in CWP's Yum Manager (under Yum History) and hitting Rollback to get the CWP build back. Also had to manually recreate /usr/lib64/postfix since it got left behind during the version change and postfix wouldn't start without it.

3
E-Mail / Re: RoundCube 1.5.12 Released
« on: March 06, 2026, 09:50:25 AM »
I found the solution for the "Internal Server Error" after logging into roundcube after the upgrade:

disable the spoof check
Edit the file:
Code: [Select]
nano /usr/local/cwpsrv/var/services/roundcube/program/lib/Roundcube/rcube_spoofchecker.phpAround line 50, you'll see something like:
Code: [Select]
PHP// Spoofchecker is part of ext-intl (requires ICU >= 4.2)
$checker = new Spoofchecker();
Insert this line right before the $checker = ... line:
Code: [Select]
return false;So it looks like:
Code: [Select]
return false;
// Spoofchecker is part of ext-intl (requires ICU >= 4.2)
$checker = new Spoofchecker();
Save and exit.
Then restart:
Code: [Select]
sh /scripts/restart_cwpsrv

4
PHP Selector / Re: Cant install any alt php version
« on: December 30, 2025, 07:03:25 PM »
Thanks i cant find the build file but ive gone with alt php v8.3 that was already installed before i started having these problems.

Ive since logged a ticket with cwp support so ill wait to hear from them then ill update here with feedback

5
E-Mail / Re: RoundCube 1.5.12 Released
« on: December 29, 2025, 10:30:16 AM »
I couldnt upgrade roundcube long before i started having problems with my php.

Ive only removed the 3 redundant repos from the list:
pgdg-redhat-all.repo
cloudlinux.repo
alt-php.repo

6
E-Mail / Re: RoundCube 1.5.12 Released
« on: December 29, 2025, 12:23:06 AM »
Here is my list:
Code: [Select]
# ls /etc/yum.repos.d/
almalinux-ha.repo                cwp.repo
almalinux-nfv.repo               epel-modular.repo
almalinux-plus.repo              epel.repo
almalinux-powertools.repo        epel.repo.rpmnew
almalinux.repo                   epel-testing-modular.repo
almalinux-resilientstorage.repo  epel-testing.repo
almalinux-rt.repo                mariadb.repo
almalinux-saphana.repo           mariadb.repo.bak
almalinux-sap.repo               nginx.repo

Im not using fpm at the moment.
Could you maybe send me your repolist so i can compare it to mine?

7
PHP Selector / Re: Cant install any alt php version
« on: December 28, 2025, 11:42:33 PM »
Noted thank you.

Ive since removed those repos as they were wrongfully added.

Ive tried installing more alt php versions and ive successfully installed php v7, v7.3 and v8. It seems that the problems is only with alt php v8.1 and v8.2 as those still fail.

I already had php v8.3 installed so i wont touch that as its working.

8
E-Mail / Re: RoundCube 1.5.12 Released
« on: December 28, 2025, 11:22:30 PM »
Im running  AlmaLinux release 8.10 (Cerulean Leopard) with PHP version: 8.1.33.

Ive removed those repos but ive been having this problem before those repos were added

9
E-Mail / Re: RoundCube 1.5.12 Released
« on: December 28, 2025, 10:28:22 PM »
ive tried multiple times to upgrade but i always get the "Internal Server Error"

Ive followed your instructions step by step but just cant seem to get it to run.

Code: [Select]
NOTICE: New .htaccess file saved as .htaccess.new.
NOTICE: The 'installer' directory still exists. You should remove it after the upgrade.

Running update script at target...
Executing database schema update.
NOTICE: Update dependencies by running `php composer.phar update --no-dev`
This instance of Roundcube is up-to-date.
Have fun!
All done.

10
PHP Selector / Re: Cant install any alt php version
« on: December 28, 2025, 10:09:47 PM »
That repo needs to be removed. Im running:

Distro Name: AlmaLinux release 8.10 (Cerulean Leopard)
Kernel Version: 4.18.0-553.89.1.el8_10.x86_64
Platform: x86_64 kvm
CWPpro version: 0.9.8.1220

Can someone maybe assist with CWP’s official alt‑PHP repo?
I added the alt-php.repo but its not resolving. I think imight have accidentally removed the proper repo

Code: [Select]
Errors during downloading metadata for repository 'alt-php':
  - Status code: 404 for http://repo.centos-webpanel.com/alt-php/el8/x86_64/repodata/repomd.xml (IP: 5.196.100.135)
Error: Failed to download metadata for repo 'alt-php': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

11
PHP Selector / Cant install any alt php version
« on: December 28, 2025, 06:43:34 PM »
I tried installing different php versions using the php selector, but it always fails.

Here is part of the build log:

Code: [Select]
Making install in example
make[1]: Entering directory '/usr/local/src/libssh2-1.9.0/example'
make[2]: Entering directory '/usr/local/src/libssh2-1.9.0/example'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/usr/local/src/libssh2-1.9.0/example'
make[1]: Leaving directory '/usr/local/src/libssh2-1.9.0/example'
make[1]: Entering directory '/usr/local/src/libssh2-1.9.0'
make[2]: Entering directory '/usr/local/src/libssh2-1.9.0'
make[2]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/usr/local/include'
/usr/bin/install -c -m 644 include/libssh2.h include/libssh2_publickey.h include/libssh2_sftp.h '/usr/local/include'
/usr/bin/mkdir -p '/usr/local/lib/pkgconfig'
/usr/bin/install -c -m 644 libssh2.pc '/usr/local/lib/pkgconfig'
make[2]: Leaving directory '/usr/local/src/libssh2-1.9.0'
make[1]: Leaving directory '/usr/local/src/libssh2-1.9.0'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 34265 100 34265 0 0 46179 0 --:--:-- --:--:-- --:--:-- 46117
/usr/local/cwpsrv/htdocs/resources/conf/el8/php_selector/external_modules/8.2/ssh2.sh: line 15: /opt/alt/php82/usr/bin/phpize: No such file or directory
/usr/local/cwpsrv/htdocs/resources/conf/el8/php_selector/external_modules/8.2/ssh2.sh: line 16: ./configure: No such file or directory
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target 'install'. Stop.
/usr/local/cwpsrv/htdocs/resources/conf/el8/php_selector/external_modules/8.2/ssh2.sh: line 20: /opt/alt/php82/usr/bin/php-config: No such file or directory
ERROR: Missing extension file /ssh2.so

Build Completed
###################


Error:Can't add notification!

Could i maybe be missing a repo?

Code: [Select]
# ls /etc/yum.repos.d/
almalinux-ha.repo                almalinux-saphana.repo  epel.repo.rpmnew
almalinux-nfv.repo               almalinux-sap.repo      epel-testing-modular.repo
almalinux-plus.repo              alt-php.repo            epel-testing.repo
almalinux-powertools.repo        cloudlinux.repo         mariadb.repo
almalinux.repo                   cwp.repo                mariadb.repo.bak
almalinux-resilientstorage.repo  epel-modular.repo       nginx.repo
almalinux-rt.repo                epel.repo               pgdg-redhat-all.repo

12
E-Mail / Re: Do updates to email filter templates apply retrospectively?
« on: September 25, 2025, 06:33:10 AM »
No it does not. Ive tried it. If you update the main email filter template, you will have to reapply it to the mailboxes for the updated filters.

13
Updates / Re: Roundcube vulnerability
« on: August 27, 2025, 09:36:23 PM »
Do you have to upgrade your cwp php version?

14
Updates / Re: Roundcube vulnerability
« on: August 26, 2025, 11:59:00 AM »
There are several steps missing @anandmys

I'll create a new KB article, the one we have online is for 1.5.9
https://starburst.help/control-web-panel-cwp/control-web-panel-cwp-admin-tutorials/update-roundcube-mail-version-1-5-9-in-cwp-on-almalinux-8-9/

I still get Server error! (Internal Server Error)

Pages: [1]