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 Loader

absolute license file paths & expiry dates

Author Message
twain47



Joined: 18 Nov 2005
Posts: 5

PostPosted: Mon Nov 28, 2005 12:42 pm    Post subject: absolute license file paths & expiry dates Reply with quote

Two small items that are causing me a few problems.

Is there any way to use an absolute path for the license file? i.e. /var/lib/license.file

I've got scripts that are installed in a number of locations that all need the same license file - at the moment I have to put a copy of the license in each system.

Also: Is there any way to find out the expiry date / time of the current license file? I'd like to put up a warning to the user when it gets near the end so they have time to get a new one. I was expecting it to be in 'ioncube_license_properties' but it doesn't seem to be.
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Mon Nov 28, 2005 3:34 pm    Post subject: Reply with quote

Hi

There is good news for both of your questions. You cannot specify an absolute path for license files, however the Loader searches up the directory hierarchy looking for the license file. Therefore, if you specified var/lib/license.file, it should be found when the search hits /

Expiry isn't into license properties, and can be retrieved using ioncube_file_info(). Although the expiry is actually in the license file, files can also have expiry information stored in the file, and this was the mechanism prior to the introduction of license files. This API function, which existed prior to license files, gives consistency, back compatibility, and a unified way to retrieve the expiry whether or not the expiry is stored in the file itself or a license file. Note that expiries can also be stored in files as well as the license file, and the api function will report whichever is the soonest expiry. Although usually license files will be used soley, the ability to have different expiry times on the files as well could be useful.
_________________
Community Admin
Back to top
View user's profile Send private message
twain47



Joined: 18 Nov 2005
Posts: 5

PostPosted: Mon Nov 28, 2005 6:28 pm    Post subject: Reply with quote

I've just tried the solution you suggested for the path problem on my test system. I get the following error:

The encoded file /var/www/html/tams/iontest.php requires a license file home/devel/tams/TAMSlicense. The file /home/devel/tams/TAMSlicense does exist

If I copy the license to

/var/home/devel/tams/TAMSlicense

the script runs correctly. It looks like the search stops one directory level too soon.

If you are changing this to fix this an abolute version might be more efficient. You could detect the path starting with a '/' or '\' ?

Thanks - it looks like 'ioncube_file_info' provides the information I need for the expiry date.
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Mon Nov 28, 2005 6:54 pm    Post subject: Reply with quote

Not checking the top most directory will be fixed. Not accepting absolute paths was a design decision as we could forsee problems where users mistakenly used the location of the file on their local machine. We'll either add support for absolute paths anyway, perhaps with confirmation required from the user that this is what they want, or alternatively add a php.ini setting to specify an additional directory to look in first for license files.
_________________
Community Admin
Back to top
View user's profile Send private message
twain47



Joined: 18 Nov 2005
Posts: 5

PostPosted: Mon Nov 28, 2005 7:13 pm    Post subject: Reply with quote

The php.ini idea sounds good, although that might add some fun with sharred hosts (not a problem for us though!)

If your going to add a confirmation please can you make sure that it can be skipped from the command line? All our files are generated non-interactively from a script (as I suspect are many other peoples)

BTW - I miss-understood which machine (installation or encoding?) this path reffered to. I don't think the existence of absolute paths would have made it any more or less confussing. It wasn't until I put the script up and saw the error message saying the license file was missing that I understood.

Maybe a sentance at the end of 4.2.1:
'All paths are on the server to which you are INSTALLING the script and license file'
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Tue Nov 29, 2005 12:40 am    Post subject: Reply with quote

Quote:
The php.ini idea sounds good, although that might add some fun with sharred hosts (not a problem for us though!)


Indeed, and this is one of the ways where our major rival got it wrong by, I think, having only a config entry.

The two together would complement each other well though. For shared hosts, and probably by far the majority of applications, license files need to be stored in user space and close to the application. The relative path and native search mechanism is exactly what's required for that case. For the case where one has control of the server, being able to specify an absolute folder gives extra flexibility.

When run from the command line, the Encoder is strictly non-interactive, and in fact has no GUI code in it at all.
_________________
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 Loader 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