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

pre-sales questions: mixed php4 5 and not encoding all files

Author Message
jonyo



Joined: 28 Sep 2006
Posts: 5

PostPosted: Thu Sep 28, 2006 1:36 am    Post subject: pre-sales questions: mixed php4 5 and not encoding all files Reply with quote

I have a web application that has 3 files (out of a whole bunch more) I want encoded, 2 of them are php 4, and one is php5. Part of the script detects what version of php is loaded, and uses the apropriate files. Is this possible to do, encoding some files to work in php4 and others to work in php5? If the server is running php5, the php4 files and php5 file will need to be able to be loaded at the same time, with the same license, is this possible?

Second question: I only want to encode 3 files as I've said, but we use a common code base for different "levels" of the software (like basic, premeir, etc). Part of the function of the encoded files is to make sure someone isn't trying to "upgrade" their product for free (or at least make it significantly harder to do so). At the same time, we want to allow access to, and modification of, the majority of the source code. Given that the rest of the software needs to be able to access classes in the encoded files, what options are there to do this?
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2801

PostPosted: Thu Sep 28, 2006 10:34 am    Post subject: Reply with quote

You can do this. With one project file it is only possible to encode all files as either PHP 4 or PHP 5, but you can do what you want as follows. Firstly, if your PHP 5 files actually compile with PHP 4, but only work as expected on PHP 5, then simply encode everything as PHP 4. If not, create two projects, one for the PHP 5 files and one for the PHP 4 files. Let's call it project one and project two. Encode project one first and then copy the encoded files into the source directory of project two. The Encoder GUI has a post encoding step, and so you could easily create a batch file to copy the encoded files after encoding. A warning here though - for obvious reasons, do not specify the target of the first project as the source of the other project because otherwise the replace feature of the Encoder would remove the target before encoding, deleting the source of the second project. You could use the merge feature, but there is too much of a risk that someone changes the target processing mode to replace instead of merge, and messes up. It would be better to encode both projects to separate folders and copy the encoded files from project one into project two.

This then works because the Encoder will copy any files that it sees as already encoded, allowing your source project for project 2 to contain encoded files from project 1. This is ideal if project one changes rarely, so that generally you just need to encode project two. Alternatively, and actually maybe this is better, instead of a post encoding step for project 1, have a post encoding step for project 2 that copied the encoded files from project 1 into the target of project 2. There are a number of ways to do it so how you do it is up to you. You could also automate all of this by creating a batch file for each project and running both Encoder commands in one batch file. There is an export batch file feature to make creating the batch files with the Encoder command lines totally trivial.

The question in your second point is unclear, but you can configure things easily so that only 3 files are encoded if this is what you want. The licensing system is also powerful in terms of preventing unauthorised files, and you can create license files that only work with certain encoded files to prevent people having access to two different levels of application from upgrading by simply replacing more basic files with their more advanced counterparts unless they have a valid license. The include attack prevention can also be useful here by using different include file keys, however this works best for projects that have all files encoded.

The best thing is to download an evaluation and start exploring. The user guide PDF also describes things in detail, so dive into that as well to find out about everything that can be done. If you need help and advice then feel free to create a helpdesk ticket and we can advise.
_________________
Community Admin
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