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

Encrypting a WordPress plugin

Author Message
BradDodi



Joined: 25 Jul 2011
Posts: 1

PostPosted: Mon Jul 25, 2011 4:57 pm    Post subject: Encrypting a WordPress plugin Reply with quote

Hellooo,
I'm trying to encrypt a WordPress plugin. I first received an error saying that the headers of the plugin were invalid. I searched around and found on these forums a thread about encrypting plugins for wordpress:
http://forum.ioncube.com/viewtopic.php?p=5667
"gesman" said that you should create another file and include the encrypted file. I've done this and it's solved the header problem, although now I'm receiving this error:
Quote:
The file /home/tehwebz/public_html/wordpress/wp-content/plugins/plugin/file.php is corrupted.


Anyone know why it's seeing the file as corrupted? Is it reading the file as it is, instead of decrypting it?

Thanks for the help. Smile
Back to top
View user's profile Send private message
tomc2011



Joined: 05 Oct 2011
Posts: 3

PostPosted: Wed Oct 05, 2011 2:53 am    Post subject: Reply with quote

I'm having the same issue.

Clearly, there's a lot of developer who is interested in this type of guidance.

Could you make a sticky please?

I had also tried the other suggestion from another thread, and it did not work.

Please advise. Thanks!
Back to top
View user's profile Send private message
jdpetrov



Joined: 09 Aug 2012
Posts: 4

PostPosted: Thu Aug 09, 2012 1:43 pm    Post subject: Reply with quote

Has this issue been resolved? I am looking at ionCube to protect my upcoming plugin release but it's all for nothing if the ionCube loader isn't being triggered when Wordpress loads a plugin.
Back to top
View user's profile Send private message
tomc2011



Joined: 05 Oct 2011
Posts: 3

PostPosted: Thu Aug 09, 2012 2:02 pm    Post subject: Reply with quote

To my knowledge, it has not been resolved. I've made numerous attempts; however, I have not been successful. Lastly, I've downloaded and tried other encrypting services and software online. They don't work either.

Would love to hear your feedback if you have had more success.
Back to top
View user's profile Send private message
jdpetrov



Joined: 09 Aug 2012
Posts: 4

PostPosted: Thu Aug 09, 2012 2:41 pm    Post subject: Reply with quote

I have achieved success with the evaluation version.

I have my main plugin file with the "comment header" full of plugin information.

I then include() the main encoded file that is in the same directory as the main plugin file.

I did not use any of the special restriction features, and I did not use any of the obfuscation features.

I was able to activate my plugin, and the code is running as expected with no error output.

I encoded under PHP 5.

My host (inmotionhosting) already has ionCube PHP Loader v4.0.12 installed.
Back to top
View user's profile Send private message
tomc2011



Joined: 05 Oct 2011
Posts: 3

PostPosted: Thu Aug 09, 2012 6:54 pm    Post subject: Reply with quote

That's great!

If it's okay with you, could you show us what you have in the comment header please?

"main plugin file with the "comment header" full of plugin information"

Thanks!
Back to top
View user's profile Send private message
jdpetrov



Joined: 09 Aug 2012
Posts: 4

PostPosted: Sat Aug 11, 2012 3:19 am    Post subject: Reply with quote

I initially tried encoding the main plugin file and using the "add header comments" feature, but doing that I found Wordpress wouldn't even activate the file. I swapped it out for the unencoded file to activate my plugin, then once activated I uploaded the encoded plugin file. Well that completely broke Wordpress with all sorts of fun error messages (didn't record them).

So I tried the "include the encoded file method". I didn't use the "add header comments" but rather took all of my php code BUT the comments and moved them to a seperate file in the same directory. I encoded THAT file, and then included it in the main plugin file. By now the only thing the main plugin file contained were the Wordpress Plugin comments and the include statement leading to the encoded file.


*** NOTE ***
I tried including the code from the "comment-only" main plugin file, but this forum kept giving me a blank page without posting my reply. Apparently there is a bug with this forum code...and I tried posting with and without the code brackets.



My plugin so far contains wordpress hooks and uses of $wpdb for database work. Everything worked like a charm. Of course the true test comes when the plugin is finished and I go to encode all sorts of complicated functions and routines...but this initial test was a proof-of-concept success.

I was using the IonCube PHP Encoder 7 evaluation. When I am ready to encode everything for the first time I'll purchase the Encoder and take advantage of their refund policy should it ultimately not work.
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Tue Aug 14, 2012 12:31 am    Post subject: Reply with quote

Glad you got it working. It's not difficult to do once you understand how the given framework, CMS etc. is doing, what text it looks for when scanning source (which is gone of course when encoded, hence why if fails). Systems that accept plugins really shouldn't be scanning source and should have a proper module introspection system where modules can identify themselves, but alas not all systems work that way.

Our refund policy isn't able to cover the case of problems with PHP scripts themselves, which is why we encourage trying first. Please make all the use of the evaluation that you need, and the support that comes with it to be sure that you can get your application setup to work when it's encoded. If you run out of time on the eval don't worry, you can simply grab a new eval to continue testing. We allow users as much time as they need to do their due diligence before investing in their license(s).
_________________
Community Admin
Back to top
View user's profile Send private message
jdpetrov



Joined: 09 Aug 2012
Posts: 4

PostPosted: Tue Aug 14, 2012 3:34 am    Post subject: Reply with quote

Thanks Nick. I did notice that the encoded php file generated by the evaluation version time-expired on its own even without me setting a specific time-expiration...but it is good to know that I can always use the evaluation version to perform short-term testing on my code before purchasing a full license.

I am thus far impressed with what I'm seeing, and of all my encoding options this one seems to be the most decode-proof available.
Back to top
View user's profile Send private message
Tobias_Conrad



Joined: 03 Oct 2015
Posts: 2

PostPosted: Sat Oct 03, 2015 8:36 am    Post subject: fatal error when file reach end date? Reply with quote

When plugin is installed and working on end date it trows an fatal error and blank the complete webpage.

Do you get the same error?
how is your workaround?

do you found a better solution crypting wordpress files?

I crypt the whole plugin and exchanged the file with the header information.
Back to top
View user's profile Send private message
alastair



Joined: 23 Feb 2010
Posts: 363

PostPosted: Tue Oct 06, 2015 9:25 am    Post subject: Reply with quote

@Tobias_Conrad

Please raise a ticket in our Support Help Desk about this so we can help you further. Please paste in any error message you may find in your error log that is relevant to the problem.

Please also say in the ticket exactly what you mean by "exchanged the file with the header information". If you mean that you manually edited the header comments then that would not work. You would need to create a file containing the header comments and then use the custom preamble file feature the (the "--preamble-file" feature on the command line). Please note that the custom comments feature will not work in this case due to the format that WordPress expects for header comments. We can give you further details in the support ticket when you create it.
_________________
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