andp97 Posted May 19 Share Posted May 19 Hi everyone, we develop WHMCS modules and we are trying to find a reliable way to debug our own module code with Xdebug while running WHMCS with ionCube Loader enabled. There is an open/closed Xdebug issue about crashes when Xdebug 3.3+ and ionCube Loader are loaded together: https://bugs.xdebug.org/view.php?id=2244 Xdebug’s compatibility docs also state that Xdebug does not work together with ionCube or similar extensions that interact with PHP internals: https://xdebug.org/docs/compat Our current test setup is: Xdebug: 3.5.1 PHP: 8.3 / 8.4 ionCube Loader: 15.5.0 Docker: php:8.3-fpm-bookworm / php:8.4-fpm-bookworm Web server: httpd:alpine proxying to php-fpm With this setup we get PHP segfaults. PHP 8.1 FPM does not seem to trigger the same issue for us. We used PHP 8.1 since WHMCS v8.13, upgrading our stack to WHMCS 9.0 and PHP 8.3, we are unable to use xDebug. We are not trying to debug WHMCS encoded core files. We only need WHMCS to run normally while debugging our own modules, hooks, and integration code. Has anyone found a stable workflow for this? Reaching the ionCube support we have this feedback: Quote Hi, Thanks for creating a ticket. This incompatibility is already known and there is no workaround for it. The only way around this would be for the ionCube Loader to disable the internal Observer API (which Xdebug uses) which would mean that Xdebug would effectively be uninstalled. Apart from that we would have to completely re-engineer our encoding format since the problem stems from the byte code of encoded functions being in a different format from the "standard" byte code of functions in PHP after compilation.  Kind regards, -- ionCube Support  Any practical setup or workaround would be appreciated. 0 Quote Link to comment Share on other sites More sharing options...
andp97 Posted May 19 Author Share Posted May 19  @PapaKai  Maybe you encountered a similar issue? 0 Quote Link to comment Share on other sites More sharing options...
PapaKai Posted July 28 Share Posted July 28 (edited) Sorry for my late reply. Yes, we run into this trouble as well. I didn't receive the notification for an unknown reason... -> 0002244: xDebug 3.3.x crashes Apache on Ubuntu 22.04 via WSL2; PHP 8.1, seeking resolution. - MantisBT Is a bug reported by my team 🙂 While the author of xdebug was no help at all, here is what we did: using Ubuntu 24 php-fpm 8.3 and no longer the standard php php8.3-xdebug We have since the change no longer seen that issue. My guess: the switch to php-fpm did the trick. Just in case that does not help - here our xdebug config of php-fpm php.ini: ``` [xdebug] xdebug.mode = debug xdebug.start_with_request = trigger xdebug.client_host = 127.0.0.1 ``` ... and here the xdebug config for the php cli php.ini - all commented out: ``` ;[xdebug] ;xdebug.mode = debug ;xdebug.start_with_request = yes ;xdebug.client_host = 127.0.0.1 ;xdebug.client_port = 9003; default anyway for v3 of xdebug ;xdebug.log = "/tmp/xdebug.log"; can't be opened ```  Hope that helps! Edited July 28 by PapaKai 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.