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

Setting Runtime Path to Key in PHP Encoder 9.0

Author Message
amitp



Joined: 26 Sep 2016
Posts: 3

PostPosted: Mon Sep 26, 2016 11:11 am    Post subject: Setting Runtime Path to Key in PHP Encoder 9.0 Reply with quote

I have a question about setting up "Runtime Path to Key" in PHP Encoder 9.0

As shown in the attached screen, the runtime path is with respect to the encoded PHP file.
It can be either absolute path, or relative path.

What if there are a number of encoded PHP files in my project, scattered in a number of directory folders?
There are multi level directory folders, and various encoded PHP files are located in each of them.

So if i use relative runtime path, i must put the same "key file" in each and every single folder where encoded PHP files are located?
Seems this is true from my testings.

How can i keep just 1 key file in the server for runtime use, but still using a relative runtime path please?

For now, i really cannot do so, unless i put the absolute full path there.
But this is undesirable as we must know the full path in advance of encoding then.

Ideally, i would like to save only 1 key file in the top directory folder, for the runtime use of all the encoded files.

However, i cannot even do so, cos the relative path is different for encoded files (from different folders) then.

Any advice please?
Back to top
View user's profile Send private message
amitp



Joined: 26 Sep 2016
Posts: 3

PostPosted: Mon Sep 26, 2016 3:25 pm    Post subject: further elaborate my question Reply with quote

my project contains a number of PHP files in different folders, e.g.

- \abc\file1.php
- \abc\file2.php
- \abc\123\file3.php
- \abc\456\file4.php
- \abc\456\xyz\file5.php


if i specify the "Runtime Path to Key" as \abc\key-file.txt, then sure the loader can find it easily.
But then, i must know the full path "\abc" BEFORE i do the encoding.

what if i won't know the full path at the time i do the encoding?
the full path may be anything.
it may be \abc\ or \def\ or \lmn\
How can i set Runtime Path to Key in such case?

and if i try to use relative path to set "Runtime Path to Key", i have 5 encoded files here in this project, how to set relative path?

do i make my question clear please?
Back to top
View user's profile Send private message
amitp



Joined: 26 Sep 2016
Posts: 3

PostPosted: Tue Sep 27, 2016 4:21 am    Post subject: Follow up Reply with quote

I'm not sure if i make myself clear or not.

If my project contains 5 PHP files for encoding,

- \abc\file1.php
- \abc\file2.php
- \abc\123\file3.php
- \abc\456\file4.php
- \abc\456\xyz\file5.php

I know it's OK if i set runtime path to key as "\abc\key.txt" (need to use absolute path)

I read from your manual that we can also use relative path.
But if i set runtime path to key as ".\key.txt", seems from my testings, it will NOT work for all 5 encoded files.

For file 1, ".\key.txt" would mean ""\abc\key.txt"
For file 3, ".\key.txt" would mean ""\abc\123\key.txt"
etc

This means i need to keep the same key files in different folders to allow successful decoding.
Am i correct please?

Do you have other solution so that i can use relative path and yet just need to keep 1 key file for the whole project?
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2756

PostPosted: Tue Oct 04, 2016 6:35 pm    Post subject: Reply with quote

Hi, the best thing is to create a support ticket for guidance on this. License files are searched for in parent directories until found, but this may be different for external key files.

It may also be that license files are going to be useful with their locking abilities and key value storage, and rather than external keys, have a look at Dynamic Keys. These are by far the most powerful protection concept, and unique to ionCube. External keys certainly have a use case, but are the best fit when the user of the encoded files is also the one who created them as the user is trusted (you should only give keys to someone you trust!).
_________________
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