Jump to content

Segmentation fault using ionCube Loader v15.5.0, PHP 8.3+ and xDebug v3.5.0


Recommended Posts

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.

Link to comment
Share on other sites

  • 2 months later...

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 by PapaKai
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated