Closed (won't fix)
Project:
Amazon Product Advertisement API
Version:
6.x-1.0-beta7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2009 at 20:34 UTC
Updated:
4 Oct 2009 at 22:44 UTC
Hi,
After installing, deinstalling and reinstalling, checking my Amazon Access Key ID & Amazon Secret Access Key, I'm still getting a 'blank page' while trying to pass the test!
Here is my error.log message:
PHP Fatal error: Call to undefined function hash_hmac() in .../modules/amazon/amazon.module on line 228, referer: http://chaikhana.bodhi3.com/?q=admin/settings/amazon/test
As newbie, I don't really understand what it means, neither what I can do.
Here is the line 228:
$signature = base64_encode(hash_hmac('sha256', $string_to_sign, $secret_access_key, TRUE));
If somebody can help, this would be great!
Comments
Comment #1
dan_metille commentedHave also replicate this post on Amazon Web Service forum: http://developer.amazonwebservices.com/connect/thread.jspa?threadID=36402
Comment #2
gregglesYou need to upgrade to PHP5.
I suggest we add to amazon.info a link about requiring php 5.x
Comment #3
dan_metille commentedWas on PHP5, but I had trouble because a missing extension for php called pecl-hash.
Now my host master has installed it and everything working fine.
Comment #4
dan_metille commentedoups, maybe I should not have closed this!
Comment #5
gregglesMaybe we need a check in hook_requirements for those functions as well and a drupal_set_message during install looking for it.
Comment #6
rfayThe info file already requires php 5.2, which I thought always had pecl-hash in it.
Comment #7
rfayComment #8
rfayAccording to http://us.php.net/manual/en/hash.installation.php, PHP 5.2 always has PECL hash in it. The module requires PHP 5.2 in the .info file. Therefore I'm going to close this. If you can show me how this happened, feel free to reopen.
Comment #9
rfayJust a little further information on this - I think I can see how this perhaps happened over time.
Drupal does not *disable* a module that does not meet PHP requirements. It just won't let you enable it. Therefore, if you somehow had Amazon module working before PHP 5.2 was a requirement, and never noticed the red X on the modules page, you never would have known, perhaps.
However, since Drupal does a pretty good job keeping you from enabling it in the first place, I think I'll leave this as 'won't fix'.