Creating a License

This procedure describes how to create a license for your code along with descriptions of the different options and parameters available for a license.

Licenses are used in organizations in order to grant use of software to users who have legally obtained a License. In addition to usage, licenses can hold additional details pertaining to the number of users, license expiration and additional means for enforcing usage to authorized users only.

 

 

Instructions on how to complete a procedure

To create a license:

  1. Click the New icon () in the Zend Guard Toolbar and select Zend Guard License from the drop down menu.
    The Product License dialog will open. This is where the license is generated.(See License Parameters for descriptions of the different parameters.) 

Product License Dialog

  1. Enter the relevant information and click Next.

  2. Use the following dialog to limit the allowed IP numbers, Zend Host IDs and the number of concurrent users.

  1. In the Concurrent Users section, click Settings to configure the number of Concurrent Users. Only after entering a value in the Concurrent Users section will the Concurrent Users Settings dialog be enabled.

  2. Click Next to continue.

Note:

Concurrent user licenses will not work on PHP running in CGI mode.

Settings Dialog

  1. Select and configure the following options, as required, then click Next:

  • Lease Timeout - The maximum amount of time that the end-user can leave the application idle before the license considers him/her to have ceased use of the application and disconnects the user from the application.

  • Cookie Support - Prevents Access when the browser does not support cookies.

  • Error Message - You can edit the Error Message sent to users without cookie support.

  • Limit Exceeded - The actions to take when the number of users attempting to use the application exceeds the maximum allowed number.

    • Wait until a lease expires - Keeps the user in queue on a first-come-first-serve basis until a lease becomes available.

    • Error Message - You can create/edit a message to display when the limit is exceeded.

  1. The Additional Information dialog will appear. It is used to store additional information in the license file that can be used in conjunction with the function: zend_loader_file_licensed() in order to implement customized licensing rules. Information placed will be signed. If this information is changed, the license becomes invalid.

Additional Information/Attributes

  1. Click Add to open the New Attribute dialog. Both the Attribute and its value must be filed in. Enter the information and click OK to return to the Additional Information dialog.
    Repeat for each attribute.

New Attribute

  1. Click Finish to create the license file.
    A confirmation request will notify if the license generation succeeded of failed.

The new license file will be generated to the location specified in the Target File location (the first screen in the Create License Wizard). The license is now ready to be installed

Cookie Support

When the Require Cookies option is NOT selected, any page can be loaded, concurrently, once, from any number of browsers, even when the number of concurrent users is limited (even to a single user).

This happens because, the first time that the page is accessed, no cookie is present.

The second time that the page is accessed, a cookie *is* present (even though not required). The server then limits access.

In addition, if the "Require Cookies" option is NOT selected, AND the browser is set to not receive cookies, any page can be loaded, any number of times, from any number of browsers.

This is because no cookie is present at any time. The server has no way to know that the page has been accessed.

In order to effectively limit the number of concurrent users you must require cookies.

Limit Number of Concurrent Users

This creates a "floating license" that limits the number of users who can concurrently use the application. When the number of users attempting to use the application exceeds the maximum, you can create the Error Message that "excess" user receives. You can also select the "Wait Until a Lease Expires" option. This option keeps the user in the queue on a first-come-first-serve basis until a lease becomes available.

Example: The developer sets the number of permitted concurrent users as 20. As long as there are no more than 20 requests to use the application, access to the application is granted to all users.  If, however, there is a 21st user, he/she is not allowed access to the application.

Lease Timeout

Lease Timeout eliminates inactive users and frees leases for queued users.

Caution:

Changing license file information (that does not begin with X- ) will invalidate the license.

License Parameter

Explanation

Product Name

The name of the product. It is used to match licenses with encoded files and therefore must match the Product Name given to the encoded files.

When a license-check is performed, all licenses found in the license directory are reviewed by a license-signature that includes the product name.

Only a license that matches by product can determine license rights and information.

Registered To

The name of the licensee i.e. the registered owner. This data (and other) is used to generate the license; it is included in the array returned by the Zend Guard API on valid licenses.

Additional Information

Used to store additional information in the license file. Information placed here will be protected by Zend Guard's digital signature technology. If this information is changed, the license becomes invalid.

Information is stored in using the format 'directive = value'  (e.g., Shareware=yes). These lines appear as text in the license file and are accessed by the same means as accessing a text file. In addition, if a license is valid, the Zend Guard API function zend_loader_file_license returns an array containing these values.

This information is used in conjunction with the function: zend_loader_file_licensed() to implement customized licensing rules. For example, you can disable certain features if the "Shareware = yes" entry exists in the license file.

Note:

To store information that will NOT be protected by the digital signature mechanism, begin the name of the directive with the prefix: X-. For example, 'X-Create-On = December 28, 2006'.
Lines beginning with X- will be ignored when the license signature is generated, however these lines will be returned by zend_loader_file_license when the license file is determined valid.

Lock to Zend Host IDs

Locks a file to a specific Zend Host ID(s). This code uniquely identifies a specific machine. Multiple entries should be separated with spaces.

Limit to the Following IPs

Adds IP information, to bind the license to a specified IP or IP range.

IPs can be specified as single IPs or a range by using wildcards, for example:

10.1.1.17

10.1.*.*

10.1.255.255

10.1.3.0/24

Note:

To specify multiple IPs use commas as separators.

Limit Number of Concurrent

Limits the number of users who can simultaneously use the application.

Developers can set the limit while writing the application. The license is encoded and forms part of the encoded application file given over to the client.

Concurrent User Settings:

Lease timeout - The maximum amount of time that the end-user can leave the application idle before the license considers him/her to have ceased use of the application and disconnects the user from the application.

Prevent Access from Browsers With no Cookie Support - Deny access from browsers without cookie support and display a predefined error message. Browsers that do not have HTTP cookie support cannot be detected by the Concurrent Users mechanism.

Generally, you should use this setting with intranet applications when access to the site deploying the application is limited and you can control the users' browser settings. This will prevent browsers without cookie support from access to the application. The setting will cause a slight performance penalty on initial access to the application. It is not generally noticeable in most intranet environments unless the internet connection is slow.

You should not use this setting with internet applications when access to the site deploying the application is unlimited and you cannot control the users' browser settings.

When The Number of Concurrent Users Exceeds Limit Options - Wait until a lease becomes available and/or display an error message.