location of license file
#1
I copied the script.php contents into the script I want to protect and added the API key I generated in PHPLicengine. Also updated the domain for where PHPLicengine is hosted. I generated a license key file and put it in the same directory as the script, along with remote.php. When I run the script, it just tells me "licensefile.php could not found." That's what the key file is named.

Any idea what the issue is?

Also, if I want users to be able to purchase once, then log in and add additional domains my script can run on, how is that done? I want to offer a multiple-domain license, so how can they add the additional domains that the script will activate on? They would just need to somehow get a new license key for each domain, but the download file would not change each time.
Reply
#2
Have you edited
$license_file_name = "licensefile.php";
as appropriate? double check it for some typo in filename and in this variable.
If you look at code you will see the error you are getting, comes from:

PHP Code:
// require $license_file_name to get the  $license_key
if (!file_exists($license_file_name)) {
   die(
"$license_file_name could not found.");
} else {
   require_once(
$license_file_name);


so it means, you should check:
$license_file_name = "licensefile.php";
check it and let me know.
Thank you,
PHPLicengine Management
----------------------------------
Unsolicited PMs will be ignored. All questions must be asked in forums.
Encrypt and License your PHP script
Follow us on Facebook
Follow us on Twitter
Blog
Follow us on Google+
Reply
#3
If your product have several folders such as /admin/, /includes/ etc. and script.php is in a folder and you are getting that error from a script running from root, it is possible that it can't find the license file due to path dependencies. If you have a config.php or so in root of your product, add this after <?php in config.php:
// Do NOT edit it.
$package_path = (dirname(__FILE__));
Then if your script.php is in /includes/ or so, require_once the config.php in script.php:
require_once ("../config.php");
now $package_path is available in script.php which looks something like:
/home/username/public_html/root_of_product
now if licensefile.php is located in /includes/, then instead of
$license_file_name = "licensefile.php";
you should have:
$license_file_name = $package_path."/includes/licensefile.php";
with this, $license_file_name will be something like:
/home/username/public_html/root_of_product/includes/licensefile.php
and licensefile.php will be find from any folder of your product.

Again, you need to do this if your product have several folders and subfolders, if everything is in just one folder, you don't need to do this, but just double check the filename spelling as I said in previous post.
Thank you,
PHPLicengine Management
----------------------------------
Unsolicited PMs will be ignored. All questions must be asked in forums.
Encrypt and License your PHP script
Follow us on Facebook
Follow us on Twitter
Blog
Follow us on Google+
Reply
#4
(02-22-2010, 03:52 PM)advantusmedia Wrote: They would just need to somehow get a new license key for each domain, but the download file would not change each time.

Even if they would need to get a new license key for each domain, you don't need to change the download file each time as domain name is not hard-coded in download file.
Current version only support 1 additional domain. second domain could be set as "Secure Licensed Domain" and you can edit language file to change it to "Additional Licensed Domain" instead of "Secure..."
Thank you,
PHPLicengine Management
----------------------------------
Unsolicited PMs will be ignored. All questions must be asked in forums.
Encrypt and License your PHP script
Follow us on Facebook
Follow us on Twitter
Blog
Follow us on Google+
Reply
#5
Yeah, I finally got that to work. I'm trying to lock up a WordPress theme, so I just had the license file in the wrong location since I was using a PHP include for the script.

But what about the multiple domain licensing? I read about someone else asking about it and the only answer was it could be custom coded.

Also, how do customers download local license files? I'm testing a local license configuration, but nowhere in the client control panel can you download the license files. And I'm also having an issue that I added a new product for the local license, but I can't see it as a product in the client control panel. I can see another product that my mock client login is not even assigned to, but not the product I want to "purchase".
Reply
#6
If both order and license status are active, regardless of license type, it could be downloaded from View Orders detail page.
If you add the second product as another package group, then you can see it from packages.php?id=2, packages.php?id=3 etc. If you want to see all products on one package listing page, you should set them in one package group. Have you actually ordered the second product you did setup that you can't see it in client area? Make sure both order and license status are active. As about multiple domain, see my previous post to this thread.
Thank you,
PHPLicengine Management
----------------------------------
Unsolicited PMs will be ignored. All questions must be asked in forums.
Encrypt and License your PHP script
Follow us on Facebook
Follow us on Twitter
Blog
Follow us on Google+
Reply
#7
I didn't do an actual order from the client side, I added it as an order from the admin side. I do have 2 different package groups, and I switched the client over to the second one but couldn't see the product available in the client control panel. It still had the other product in there. I figured I needed to order from the client side to see the license key, but I couldn't even see the product to order it.

So do you have a suggestion for a work-around for multiple domains? This is really a deal-breaker and others have expressed interest in having that feature available as well. Is it possible to somehow create a download that shows up after their original purchase where they can download it again with a new license at no charge? Then they would have to purchase it first, then they have access to additional domains?
Reply
#8
After ordering a new order in admin area, you should look at its id from url ?do=edit&id=xx then you should add a new license record for that order from "Manage License->Local License Creator" from left menu link, when adding a new license record, fill in order_id field from xx you got from that order url. This is why you could not find a license file for that product, due to lots of dependencies, assigning new orders to clients in admin area is not recommended, instead you should place an order as client. What is your another product, you could not see the product to order? I see two "Flexibility 3", "LaunchBoxPro Theme", do you have another one yet?

In current version you can set 2 domains for each license key, if you want to allow them to change the domain at any time, enable "Allow Domain Change" in Configuration->Settings, then the domain name is editable in client area under view order details page, the same page they can download the license key.
Thank you,
PHPLicengine Management
----------------------------------
Unsolicited PMs will be ignored. All questions must be asked in forums.
Encrypt and License your PHP script
Follow us on Facebook
Follow us on Twitter
Blog
Follow us on Google+
Reply
#9
I'm having a hell of a time getting this to work. I did notice that if I deleted the original package, the client-side control panel errors out because it's looking for packages.php?id=1. When I deleted id=1, it errors out.

Anyway, I deleted everything and started over. I readded everything, set account and license to automatically be active, went into MySQL and reset all the ID's of packages, downloads, licenses everything to 1 and made sure any references within each table was correct. This was to prevent the error above from happening.

I created a new account client-side and purchased the product. I got one email as a client that was completely blank except for the PHPLicengine footer and no subject line. I got another one as admin notifying me of the sale.

When I go back to the client control panel, I can view the invoice, the order and the products, but the download products pages says "There is no package to download". This was a local license product, and there is no license file to be found. The local license was all set up prior to purchase.

This shouldn't be this difficult. What am I missing??

Follow up: I just realized the licenses were not automatically activated. I have that set to auto-activate, so why do they sit inactive in my admin?

More follow up: After activating the licenses, nothing is visible in the download page client-side. And also, here's the text of the licence file:

<br />
<b>Fatal error</b>: Call to undefined function [obfuscated]() in <b>/home/xxxxxxxx/public_html/xxxxxxxxxx.com/includes/createkey.php</b> on line <b>0</b><br />
Reply
#10
We apologize for the pain you got, as about blank email, and auto-activate license these are bugs which are already fixed in v1.3. if you see: http://www.phplicengine.com/changelog.txt

As about blank email you can still fix it running this SQL via phpMyAdmin:

Code:
INSERT INTO phplicengine_email_templates (template_name, email_subject, email_body) VALUES
('acc_active', 'Account Creation', 'Hello %%first_name%% %%last_name%%,\r\n\r\nYour account has been setup succesfully.\r\nIf you have any questions or there is a problem with your account, please contact us.\r\n\r\nRegards,\r\nAdministrator\r\n%%COMPANY%% - Accounts Department');

For downloads not being shown, have you seen this? http://forums.phplicengine.com/thread-98.html
If there is still a problem with download, please let us know.

packages.php?id=1 has nothing to do with product id 1, but it looks for package group 1 and you should assign one or some packages to that group, if a group has no assigned package, a message will be shown and you can edit that error message in /languages/english/packages.php for the constant:
define("PAGE_TITLE", "ERROR! No Package", true);

1) As about license fatal error, try to download the license key on admin part and see if you are seeing the same error in file?
2) Did you edit /includes/dynamickey.php? By default you don't need to edit it, if you don't use this feature, make sure no optional variable is set to "?".

If you could not yet fix missing download and license error, email us admin login details as well as a temporary ftp access, that we can check it for you.
Thank you,
PHPLicengine Management
----------------------------------
Unsolicited PMs will be ignored. All questions must be asked in forums.
Encrypt and License your PHP script
Follow us on Facebook
Follow us on Twitter
Blog
Follow us on Google+
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  License activation diogogpinto 1 2,919 02-02-2012, 04:06 AM
Last Post: Admin
  License per domain? KSosz 1 3,289 09-20-2011, 11:35 PM
Last Post: Admin
  Remote License Communications Question phpdog 1 3,171 09-01-2011, 01:34 AM
Last Post: Admin
Sad remote License are invalid xanario 9 11,791 06-26-2010, 08:48 AM
Last Post: Admin
  This license is generated by PHPLicengine string causing errors RSS feed richowen 3 5,896 06-15-2010, 10:44 PM
Last Post: Admin
  The license file is not found. VicToMeyeZR 1 4,951 12-16-2009, 02:00 AM
Last Post: Admin
  License based on multiple domains, possible? woscom 3 7,474 11-09-2009, 03:27 AM
Last Post: Admin
  Can a license go local then remote? tooltrainer 5 14,523 11-01-2009, 09:42 AM
Last Post: Admin
  License not showing up for clients aioshared 2 6,018 10-24-2009, 05:13 PM
Last Post: aioshared
  Setting up Remote License hayama 4 13,434 10-20-2009, 09:20 AM
Last Post: hayama

Forum Jump:


Users browsing this thread: 1 Guest(s)