frankenphp icon indicating copy to clipboard operation
frankenphp copied to clipboard

Add php extension IonCube

Open DrjavaB opened this issue 1 year ago • 8 comments

Describe you feature request

how to integrate ioncube with frankenphp and caddy? is there any simple solution?

DrjavaB avatar Jul 04 '24 11:07 DrjavaB

Can you describe more about what you mean?

withinboredom avatar Aug 01 '24 20:08 withinboredom

The ioncube.com tool helps PHP developers protect their valuable code from theft and misuse. This tool encrypts PHP files using a PHP extension called ioncube_loader, allowing the PHP handler to retrieve and execute the encrypted code content. Currently, frankenphp is not compatible with this extension. If you need more information or want to read the documentation for this tool, you can visit the official website mentioned at the beginning of the text. You can also download and use the appropriate ionCube Loader for your specific OS or platform through the following link: https://www.ioncube.com/loaders.php

hadikhanian avatar Oct 16 '24 08:10 hadikhanian

@hadikhanian any idea why it would be incompatible? In theory, any ZTS extension should work just fine unless it is doing weird stuff with signals or the execution stack.

withinboredom avatar Oct 18 '24 21:10 withinboredom

@withinboredom tested with dunglas/frankenphp:1.3.1-php8.2.25-bookworm and the ioncube_loader_lin_8.2_ts.so loader, and getting

Failed loading /usr/local/lib/php/extensions/ioncube_loader_lin_8.2_ts.so: /usr/local/lib/php/extensions/ioncube_loader_lin_8.2_ts.so: undefined symbol: zend_signal_globals_id

NicolasDierick avatar Nov 19 '24 10:11 NicolasDierick

Frankenphp isn't compatible with zend_signals (php is compiled with --disable-zend-signals).

withinboredom avatar Nov 19 '24 13:11 withinboredom

Is there any reasons ? or any possibilities in a near future to be compatible with zend_signals ?

NicolasDierick avatar Nov 19 '24 13:11 NicolasDierick

Frankenphp isn't compatible with zend_signals (php is compiled with --disable-zend-signals).

But IMHO this isn't the main problem, the main problem is that the extension isn't compiled in ZTS mode.

Is there any reasons ? or any possibilities in a near future to be compatible with zend_signals ?

Zend Signals is totally broken in ZTS mode and has some incompatibilities with the Go runtime. Also, it's totally useless for FrankenPHP.

dunglas avatar Nov 19 '24 13:11 dunglas

But IMHO this isn't the main problem, the main problem is that the extension isn't compiled in ZTS mode.

There is a Thread Safety version for each Ioncube Loader named "ts" version

Also, it's totally useless for FrankenPHP.

Can you give more details on this point ? As FrankenPHP is not encoding the source code, even in the standalone version, "anyone" can retrieve the entire php source code in the /tmp directory

Zend Signals is totally broken in ZTS mode and has some incompatibilities with the Go runtime.

So i guess, this is the main issue

thank you

NicolasDierick avatar Nov 19 '24 13:11 NicolasDierick

@withinboredom probably also want to close this (essentially duplicate) issue.

Fix is that IonCube compile their zts modules against php without zend signals, or users build their own libphp.so from source with them enabled.

henderkes avatar Jul 31 '25 09:07 henderkes