Author |
Message |
nalogovik
Joined: 11 May 2018 Posts: 1
|
Posted: Fri May 11, 2018 10:22 pm Post subject: ioncube and pthreads |
|
|
php crashes with segmentation fault when i use Thread class (pthreads extension) and ioncube encode.
How combine ioncube and pthreads? |
|
Back to top |
|
 |
frijj2k
Joined: 19 Feb 2019 Posts: 2
|
Posted: Tue Feb 19, 2019 5:31 pm Post subject: I'm interested in this also |
|
|
Hi,
I have recently created a platform that needs to be hosted in a clients premises but I am looking to protect the source code via ionCube or similar.
Part of my platform uses a Laravel command that spawns multiple threads using pthreads and I need to know if ionCube will support protecting this part of the system before I commit to buying it.
Cheers |
|
Back to top |
|
 |
alastair
Joined: 23 Feb 2010 Posts: 405
|
Posted: Tue Feb 19, 2019 6:07 pm Post subject: |
|
|
Hi,
Unfortunately this isn't something that can be resolved as pthreads creates threads within PHP's executor. We use our own executor within the ionCube Loader, which increases security, but doesn't support thread creation and so pthreads will not work.
Having said that, we did find a post with a possible work around for this issue but it may result in a memory leak. I thought you might want to take a look so I'm pasting in the link below.
https://github.com/krakjoe/pthreads/issues/198 _________________ Alastair
ionCube |
|
Back to top |
|
 |
frijj2k
Joined: 19 Feb 2019 Posts: 2
|
Posted: Wed Feb 20, 2019 2:25 pm Post subject: |
|
|
Thanks for the reply...
Ok, so am I correct in assuming that I could protect as many files as possible but leave some (which are required by the pthread script) un-encoded so they will run as normal (and shared code between the console and web versions could be a mix of protected and unprotected files and would function as normal?
So to round it up.. I would need the console version to run under normal PHP without the loader and the web UI to run with the loader. the console files would be completely un-protected and the web UI would be protected apart from the few files that they share (Laravel Models and a couple of libraries/repositories)...
Another thought... Would it be possible for a pthread to spawn a version of PHP with the loader in each thread (rather than requiring the files like in the link you sent me)?
Your help is very much appreciated!
Cheers,
Dave |
|
Back to top |
|
 |
alastair
Joined: 23 Feb 2010 Posts: 405
|
Posted: Mon Feb 25, 2019 11:41 am Post subject: |
|
|
Hi,
The unencoded files would run as normal under pthreads.
Whilst there are versions of the ionCube Loader that work with thread-safe PHP, the Loader is unaware of threads created by the pthreads library and therefore is liable to fail with encoded files. _________________ Alastair
ionCube |
|
Back to top |
|
 |
|