Associate Engine XML Script  
Home > Associate Engine > v2.12.28

Note: This page is for an old version of Associate Engine. Refer to documentation for the latest version instead: Download & Installation.

Associate Engine v2.12.28

To install the Associate Engine script, following these instructions:

  1. Contact us to obtain your amazon.key file. This file is unique to your amazon.com associate ID. Without an amazon.key file, Associate Engine will operate in "demo" mode, that is, all links in the results will not contain any amazon.com associate ID. To obtain your amazon.key file, complete the Key Request form.

    Note: You do not need to obtain a "Developer Token" from Amazon.com Web Services to use Associate Engine.

    Wait to receive your amazon.key file before continuing to the next step.

  2. Download the Associate Engine script by clicking the right button of your mouse on one of the following links and selecting "Save Target As..." (or equivalent):


  3. If you already have amazon.pl (non-XML version) installed, make a backup of your current amazon.pl and amazon.ini files so you can reinstall them if necessary.

  4. Create a temporary directory on your Windows PC and then unzip the .zip on your Windows PC into that temporary directory. The temprorary directory will now contain several files and sub-directories.

  5. Using a plain text editor, such as the Windows Notepad, edit the amazon.pl script file as follows:

    • To run a script program written in Perl, your web server uses a program pre-installed on your web server called "perl". The first line of the script tells the web server in which directory the perl program is located. The perl program is typically at "/usr/local/bin/perl". The first line of the amazon.pl script is: (the #! are required):

      #!/usr/local/bin/perl

      This setting works as is on most web servers. If this does not work, then look at any other .pl script files you use or ask your web server administrator what the location of the perl program is. If you have access to the server's unix/linux command prompt, try typing the command "where perl" or "which perl". This will show you the location of the perl program.

      If necessary, change the first line of the script so it indicates the location of the perl program on your web server.

  6. Edit the amazon.ini file -- this new amazon.ini is completely different than any amazon.ini file that you may have used with the old amazon.pl script. Most settings in this new amazon.ini file will work as is without modification. Note: Leave the cache.size and imgcache.size set at 10mb (or less) otherwise the script may slow down. If you added any x... variables to your old amazon.ini file, copy them to the new amazon.ini file.

  7. If imageWH in amazon.ini is set to yes, then: on your web server, create directory ae-imgcache (in the same directory where amazon.pl is). Set write permissions on this directory using CHMOD to 777 (rwxrwxrwx). The ae-imgcache directory is not needed if you set imageWH to no in amazon.ini

  8. On your web server, create directory ae-cache (in the same directory where amazon.pl is). Set write permissions on this directory using CHMOD to 777 (rwxrwxrwx), or alertnatively try 775 (rwxrwxr-x). If this directory already exists from using the old amazon.pl, you don't have to do anything and you can skip this step (old cache files will automatically be flushed).

  9. In your cgi-bin directory: upload amazon.pl, amazon.ini, amazon.key, and the ae-format directory. Be sure to use ASCII mode of your FTP program when uploading these files. Some Macintosh FTP programs say "Text mode" -- use that if there is no "ASCII mode" setting.

  10. If you are using the store Page Templates, upload the ae-img directory (found inside ae-template/store) to the root directory of your website. Images in that directory are used by the store Page Templates. Thus those images will be available at www.mydomain.com/ae-img/*.gif

  11. You should end up with directories/files on your web server as shown in the following diagram.

  12. Set execute permissions of amazon.pl using CHMOD to 755 (rwxr-xr-x).
    Set read permissions of amazon.ini and amazon.key using CHMOD to 644 (rw-r--r--).
    Set permissions of ae-format directory using CHMOD to 755 (rwxr-xr-x).
    Set read permissions of files in ae-format directory using CHMOD to 755 (rwxr-xr-x).

  13. To see if the new amazon.pl works, access amazon.pl without any parameters, e.g.: www.domain.com/cgi-bin/amazon.pl --- you should see a list of book bestsellers. All other calls to Associate Engine on your current webpages should work fine, that is, you do not have modify your existing links or <script> tags. Your existing Page Templates should work. Move your mouse over a product link and you should see your amazon.com affiliate ID in the link (the link is longer than the old style links; this is because of the way Amazon.com's XML interface works -- the new link style works fine and is tracked by amazon.com).

    The amazon.key file contains the key required to make amazon.pl work with your amazon.com affiliate ID. In amazon.key there is a "cfg" variable. You can use that value to verify the configuration being used by Associate Engine. Access Associate Engine as follows:

    www.domain.com/cgi-bin/amazon.pl?cfg=CFGVALUEHERE

    (replace your domain name and CFGVALUEHERE with your values; adjust path "/cgi-bin/" and filename "amazon.pl" if different on your web server).

  14. If your server responds with "500 Internal Server Error", then try the following:

    1. Try re-uploading the script using ASCII transfer mode (might be called "Text mode").
    2. Set the file permissions as summarized in the table in the next section below.
    3. Check the first line of the script and verify that it indicates the full filename of the perl program. If you don't know which directory the perl program is located in on the server, ask your web server administrator.

  15. If you have any questions before or after installation of Associate Engine, contact us.

File Permissions

The following table summarizes the correct read/write/execute permissions for each file so that Associate Engine can function. In general, it is best to set only those permissions that a file/directory needs. Having excessive permissions set is not desirable because of security issues.

File or Directory CHMOD value User Permissions Group Permissions Others Permissions Comment
Read Write Execute Read Write Execute Read Write Execute
amazon.pl 755 R W X R - X R - X Enable amazon.pl file to be run.
amazon.ini 644 R W - R - - R - - Enable reading of amazon.ini file.
amazon.key 644 R W - R - - R - - Enable reading of amazon.key file.
ae-cache/ 775 R W X R W X R - X Enable reading/writing to ae-cache directory. If files cannot be written to the cache directory, try the alternate below.
ae-cache/
(alternate setting)
777 R W X R W X R W X Enable reading/writing to ae-cache directory. This alternate setting has Other-Write permission set. Some servers may require this permission set.
ae-format/
ae-include/
ae-asin/
755 R W X R - X R - X

Enable reading of the directories that contain read-only data. The files in these directories are not modified by the amazon.pl script and thus do not require Group/Others-Write permission.

Note: The ae-include and ae-asin directories are optional. That is, create them only if you are going to use the functionality they provide. You can create them later when you start to use that functionality.

ae-format/*
ae-include/*
ae-asin/*
644 R W - R - - R - -

Set these permissions (644) for each of the files in these directories. Enable reading of the read-only data files. These files are not modified by the amazon.pl script and thus do not require Group/Others-Write permission.



Features

Some of the advantages/features of using the Associate Engine script are:


Notes

Associate Engine is designed to maintain as much functionality of amazon.pl (non-XML) as possible. However, some functionality is not present in Associate Engine compared to the amazon.pl (non-XML) script:





E.&O.E.; © Cusimano.Com Corporation; www.c3scripts.com