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 -> Programming

license-check script doesn't seems to work

Author Message
benedykt



Joined: 07 Oct 2012
Posts: 1

PostPosted: Sun Oct 07, 2012 2:49 pm    Post subject: license-check script doesn't seems to work Reply with quote

Hi.

I've just downloaded demo version of ioncube encoder to try this software before buy and i've encountered problem with license-check script. It just doesn't seems to work for me. Here is what i do:

test.php
Code:

<?php

echo "<pre>\n";


var_dump(ioncube_license_properties());

echo "</pre>\n";

?>


What i do:
Code:

ioncube_encoder --replace-target --without-loader-check --with-license /etc/license.txt --passphrase=test --license-check script src -o trg
echo >/etc/license.txt
php ./trg/test.php
Fatal error: The license file  /etc/license.txt for ./trg/test.php is corrupt.  in Unknown on line 0


Anyone know why it doesn't work?


What i need to do is move license checking inside php script so i could provide license upload to customer when license.txt is corrupt, expired etc

Anyone know why it doesn't work?

Regards
Benedykt Kroplewski
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2757

PostPosted: Mon Oct 08, 2012 10:50 am    Post subject: Reply with quote

A prerequisite is that a license exists and is valid, however you can override the default Loader behaviour and handle cases of a missing or corrupt license with a Loader callback handler in a file that does not itself require a license. Callbacks get passed a code and relevant parameters. For example, dumping the code and params in the case of a missing license file that's required by a file cortest-enc.php, we get:

Code:

int(6)
array(5) {
  ["license_file"]=>
  string(12) "lic.txt"
  ["current_file"]=>
  string(20) "/tmp/cortest-enc.php"
  ["ip_address"]=>
  string(0) ""
  ["domain_name"]=>
  string(0) ""
  ["include_file"]=>
  string(0) ""
}


The license file in that case is the relative path specified when encoding.

If the license file is corrupt, we get:

Code:

int(7)
array(5) {
  ["license_file"]=>
  string(12) "/tmp/lic.txt"
  ["current_file"]=>
  string(20) "/tmp/cortest-enc.php"
  ["ip_address"]=>
  string(0) ""
  ["domain_name"]=>
  string(0) ""
  ["include_file"]=>
  string(0) ""
}


In this case the license file is the actual location where the license file was found.

Please create a support ticket in our Helpdesk at http://ioncu.be/S if further official support is required,
_________________
Community Admin
Back to top
View user's profile Send private message
mruz



Joined: 09 Mar 2014
Posts: 2

PostPosted: Tue Aug 05, 2014 11:42 am    Post subject: Reply with quote

Hi,
Is it possible to looking for license in 2 files: license.txt or by domain name eg example.com.txt?

Regards,
Mariusz
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2757

PostPosted: Wed Aug 06, 2014 1:50 am    Post subject: Reply with quote

Potentially, but this would be an odd thing to do. Please contact support at http://ioncu.be/S to explain what requirement you are trying to solve and we can suggest a way to approach it.
_________________
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 -> Programming 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