Dokuwiki - Amazon Plugin

> DokuWiki

1 - About

Note about the Amazon Plugin of Dokuwiki.

3 - Problem

3.1 - Call to undefined function: hash_hmac()

The plugin:amazon have an incompatibility problem if you don't have PECL installed.

Fatal error: Call to undefined function: hash_hmac() in .../dokuwiki/lib/plugins/amazon/syntax.php on line 284

3.2 - Solution

Found in this Forum, replace this line in the file syntax.php :

        $signature = base64_encode(hash_hmac("sha256", $string_to_sign, $private_key, True));

by :

	$signature = base64_encode(mhash(MHASH_SHA256, $string_to_sign, $private_key));

4 - Patrner ID

PartnerID for the American Amazon store gerardnico-20
PartnerID for the German Amazon store gerardnico01-21
PartnerID for the Japanese Amazon store
PartnerID for the British Amazon store gerardnico0d-21
PartnerID for the French Amazon store gerardnico-21
PartnerID for the Canadian Amazon store