|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.
To install the Associate Engine script, following these instructions:
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.
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):
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.
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.
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):
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.
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.
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-imgcachedirectory is not needed if you set imageWH to no in amazon.ini
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).
In your cgi-bin directory: upload amazon.pl, amazon.ini, amazon.key, and the
ae-formatdirectory. 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.
If you are using the store Page Templates, upload the
ae-imgdirectory (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
You should end up with directories/files on your web server as shown in the following diagram.
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-formatdirectory using CHMOD to 755 (rwxr-xr-x).
Set read permissions of files in
ae-formatdirectory using CHMOD to 755 (rwxr-xr-x).
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:
(replace your domain name and CFGVALUEHERE with your values; adjust path
"/cgi-bin/"and filename "amazon.pl" if different on your web server).
If your server responds with "500 Internal Server Error", then try the following:
- Try re-uploading the script using ASCII transfer mode (might be called "Text mode").
- Set the file permissions as summarized in the table in the next section below.
- 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.
- If you have any questions before or after installation of Associate Engine, contact us.
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|
|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.|
||775||R||W||X||R||W||X||R||-||X||Enable reading/writing to
|777||R||W||X||R||W||X||R||W||X||Enable reading/writing to
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.
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.
Some of the advantages/features of using the Associate Engine script are:
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:
Movers & Shakers is not implemented. If requested, user is redirected to appropriate Movers & Shakers page at amazon.com. If amazon.pl is called using a <script> tag, then the user is shown a link to the appropriate Movers & Shakers page at amazon.com
- "Multiple Sites" (via the site parameter) are not support.
E.&O.E.; © Cusimano.Com Corporation; www.c3scripts.com