Monday, May 31, 2010

PHP: Amazon Store Manager / Freekrai.net

today i would like to mention a small problem with the Amazon Store Manager script available from Freekrai.net:

information in the readme.txt file reads: This program has been created by Roger Stringer and works with PHP4. since the introduction of the Amazon Product Advertising Service (formerly known as Amazon Web Services or Amazon E-Commerce Service [ECS], calls to amazon's server require a signed request. the Signature function hmac, however, only works with php5.

another requirement is that the php function allow url fopen must be set to On. to accomplish this simply create a php.ini file with the following line in it:
allow_url_fopen = On;
and save it to the store's root directory.

there is another small error in the aws4class.php5 file:
find
$ValueStringArray[] = "Timestamp=" .gmdate("Y-m-d\TH:i:s\Z");
(should be on line 258) and change it to
$ValueStringArray[] = "Timestamp=" .gmdate("Y-m-d\TH:i:s.000\Z");

should the script still not work you might have to follow the instructions about Troubleshooting in the readme.txt file
replacing
RewriteEngine On
with
Options +FollowSymlinks
RewriteEngine on
RewriteBase /AmazonStoreManager4/

in the .htaccess file, where in this example /AmazonStoreManager4/ is the scripts root directory.

these are all the basic changes i made to get the script to work.

enjoy!

tom.paine


No comments: