iono Documentation - Product Downloads

Downloads are linked to a version, license and/or extra to allow you to specify which downloads a customer who has a particular license or extra gets access to.

For example if a license gives access to all downloads for v1.0.0 then customers with that license will be able to access those downloads only. If a license or extra gives access to a specific download then a customer who has that license or extra will get access to that download in addition to any allowed by the license version. This means you can provide downloads which are only available once a customer has purchased a specific extra.

Product downloads are essential if you are distributing your software products to your customers. They are added on a per Product License or Product Extra basis and can contain many options. All downloads by your customers are logged for your future reference.

iono allows you to encode your PHP source code on demand, providing that you have an encoder tool available on your server. The way that iono is coded means that all encoders are supported if they provide the option to encode from the comand line. This includes ionCube Encoder, Zend Encoder, SourceGuardian and Turck MMCache. See Encoder Compare for a detailed comparison.

Most product downloads are done as System Path downloads which means the file resides on the server iono is installed on. This allows you to use the advanced options like the CVS/SVN Checkout, Source Encoding and Package Archiving.

Add

Click the Add Download link from the sub-menu to get to the add download page. You will then need to fill out the following fields.

Once you have chosen the location of the download, you will be faced with a final screen to complete depending on the choice you made:

Upload file

Browse to the file on your computer and it will be uploaded to your iono installation ready for download by your customers.

Specify file on the server

This file or directory containing the files should already be uploaded to the iono release_source/ directory and so the path you enter should be relative to the release_source directory. You can specify a certain file or a directory containing many files. For example:

  1. release_source/file.php
  2. release_source/product/file.php
  3. release_source/directory

For each case, the value in the Path field would be:

  1. file.php
  2. product/file.php
  3. directory

You should not use a trailing slash/ in any case. You can also provide distribution options for the file, which are explained below.

Direct URL

In the textbox, enter the URL that you wish the customer to be redirected to when they click to download.

Distribution Options

When providing a path to a file on the server, you can also provide additional distribution options. When a customer clicks to download a file, these will be performed before sending the file to the customer.

Note that CVS and SVN are not available on Windows servers.

CVS

If you want the latest files to be exported from CVS when the customer requests the download, you need to enter the CVS command line. The files will be exported maintaining their exact directory structure and will be contained within the directory you specify in the Path field (therefore the Path value must be a directory). They will also be contained within that directory in a directory called the same as the module name. The actual command executed is cvs export and so there will be no CVS control files. The command must be entered in this format:

:[type]:[username]:[password]@[server]:[repository]:[module]

So for example:

Would result in this command:

:pserver:david:olate@example.com:/usr/cvs:egmodule

SVN

If you want the latest files to be exported from SVN when the customer requests the download, you need to enter the SVN URL. The files will be exported maintaining their exact directory structure and will be contained within the directory you specify in the Path field (therefore the Path value must be a directory). They will also be contained within that directory in a directory called the same as the module name. The actual command executed is svn export and so there will be no SVN control files. The URL can be in any valid SVN format.

Encode Command

Encoding on demand can be performed on a single file or a whole directory of files. You will need to provide the full command line to encode which can usually be constructed with the aid of the encoder user manual.

Single File

If you are encoding a single file, the name of the file should be provided in the Path value. A copy of the file will be made so that the original is not encoded. You then provide the command line with the source file as the original, and the destination output as the same with _enc/ appended to the file name (the output is a directory). So, for example:

In the case of using ionCube, this command line could be used:

ioncube_encoder release_source/file.php --into release_source/file.php_enc/ --ascii

The actual paths would be replaced with their real values in your case.

Directory

Encoding a directory is very similar to encoding a single file. In this case, the source is the directory name and the output is the directory name with _enc/ appended to it. The source directory will be copied to the _enc/ directory. So, for example:

In the case of ionCube, this command line would be used:

ioncube_encoder release_source/dir --into release_source/dir_enc --ascii

Archive

The final option is to archive. This will package either the single file or whole directory (and sub directories) specified in the Path value into either a Zip, Tar, Tar GZ or BZip2 format. iono automatically detects which formats are available to you on your server and only shows those available. To make them all available, you will need to compile PHP with the following options:

--with-zip (for Zip)

--with-zlib (for Tar GZ)

--with-bz2 (for BZip2)

If you have none of these compiled, the tar option will be the only option available as this requires no special configuration.

The archive will automatically be generated after all the other actions you may have chosen (CVS/SVN export, encoding) have completed. The file/directory specified in the Path field will be archived.

You must select an archive type when distributing a directory as you cannot distribute a raw directory as a download. If you do this, an error will be generated when trying to download the file.

release_source/ and release_distribution/ Directories

These directories are essential for the use of System Path downloads. By default, they are within your iono root directory however it is advisable to move them. They must both be writable by the web server.

The release_source/ directory is where you will upload the files you wish to distribute. Ideally, this should not be in a publicly accessible location to prevent malicious users guessing file names.

The release_distribution/ directory is where files are copied from release_source/ so they can be downloaded by customers. Therefore it must be accessible by your customers. The Path to release_distribution/ in Settings should be set so that it points to the web accessible release_distribution/ directory.

Both the release_source/ and elease_distribution/ directories can be moved and renamed but if you do so, you need to update their location in the Settings section of iono. This should be the full system path when using on both Windows and Linux servers. Remember that both directories need to be writable (chmod 777 on Linux) otherwise you will receive errors. iono will provide a warning on the Admin Index if they are not writable.