Zend Guard - CLI License Generation


1. Generating license based on a template

In this example, there are no special security considerations.

zendenc_sign <license_template> license.zl <keyfile>

<license_template> looks like this:

Product-Name = test
Registered-To = test user
Expires = Never
Hardware-Locked = No
Host-ID = Not-Locked

You can change the parameters in the license template as you need (expiration, host ID if you lock to specific hardware etc.).

license.zl is the output file you send to the customer, to us in license path where the same PHP application is loaded (same Product-Name as the encoded files).

Sample content of license.zl output matching the above license template would be:

Product-Name = test
Registered-To = test user
Expires = Never
Hardware-Locked = No
Produced-By = Zend Technologies Ltd.
Verification-Code = asddsaasdasdasdasdasd

<keyfile> is the private key you generated (with --genenckey, or --extractkey from existing license for compatibility of newer files and licenses). This file has 'Company-Key = xxxxx' format, and must be kept safe in order to keep encoding and licensing new files for same encoded app.

If the keyfile is not holding valid Company-Key, verification will probably fail and give you missing 'Produced-By' since it cannot make a valid license holder.

To generate working licenses for your PHP project, You must use the same private key and product name which you've used for encoding!

2. Interactive License Generation

If you wish to create the license step by step, without a template, you can execute zendenc_sign without the template file and you will get prompted for the license inforamtion including security restrictions and custom fields.

zendenc_sign license.zl <keyfile>