ionCube Logo
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


 
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder

ioncube and pthreads

Author Message
nalogovik



Joined: 11 May 2018
Posts: 1

PostPosted: Fri May 11, 2018 10:22 pm    Post subject: ioncube and pthreads Reply with quote

php crashes with segmentation fault when i use Thread class (pthreads extension) and ioncube encode.
How combine ioncube and pthreads?
Back to top
View user's profile Send private message
frijj2k



Joined: 19 Feb 2019
Posts: 2

PostPosted: Tue Feb 19, 2019 5:31 pm    Post subject: I'm interested in this also Reply with quote

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
View user's profile Send private message
alastair



Joined: 23 Feb 2010
Posts: 378

PostPosted: Tue Feb 19, 2019 6:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
frijj2k



Joined: 19 Feb 2019
Posts: 2

PostPosted: Wed Feb 20, 2019 2:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
alastair



Joined: 23 Feb 2010
Posts: 378

PostPosted: Mon Feb 25, 2019 11:41 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum