After installed the module amazontools, I tried searching a keyword from adminster/amazon item import but got the following error message.

Fatal error: Call to a member function on a non-object in
.../modules/amazontools/amazon.php4.inc on line 184

any solution to fix it?

-------------------------------------------
For my web server the curl and domxml extensions had been installed:

curl
CURL support enabled
CURL Information libcurl/7.12.0 OpenSSL/0.9.7a zlib/1.1.4

domxml
DOM/XML enabled
DOM/XML API Version 20020815
libxml Version 20622
HTML Support enabled
XPath Support enabled
XPointer Support enabled
DOM/XSLT enabled
libxslt Version 1.1.8
libxslt compiled against libxml Version 2.6.22
DOM/EXSLT enabled
libexslt Version 1.1.8

Comments

Prometheus6’s picture

What did you search for? I need to see what was returned by Amazon.com.

astra’s picture

Searching a keyword, for example, medicine, or acupuncture, or massage ... . Every time I got the error message.

Prometheus6’s picture

I'm sorry, I can't duplicate the problem. There isn't even any code on line 184...did you download the HEAD version or the 4.6 version?

astra’s picture

Yes. I downloaded the 4.6 version (amazontools-4.6.0.tar.gz). I have a check for the file amazon.php4.inc and find the code:

line 182: function _amazon_items_array_from_DOM($amazonDOM) {
line 183: $AmazonItemList = array();
line 184: $_Amazon_items = $amazonDOM->get_elements_by_tagname('Item');

ob3ron’s picture

Title: Error with amazon item import » Same here

I'm having the exact same problem. CURL and DOM/XML are enabled, PHP version is 4.3.10. I have the 4.6.0 version that I just downloaded, plus I've tried a slightly older download that I installed in another site (on a different host) which works fine. I don't know what other info I can give you, but if there's anything else I can check, please let me know.

Thanks!
Arvana

ob3ron’s picture

Sorry, just to clarify, the slightly older version works fine on the other site, but still doesn't work on the site I'm having trouble with.

chx’s picture

Title: Same here » Error with amazon item import
ob3ron’s picture

I discovered the problem; in my case it was the web host's firewall. I asked them to set permission for http://webservices.amazon.com, and now it works.

Hope this helps you astra, and anyone else who has this problem. Note that you'll have to set the firewall for the locale you're using, eg http://webservices.amazon.co.uk, etc.

Prometheus6’s picture

Thank you because I absolutely could not duplicate the problem

Prometheus6’s picture

Priority: Critical » Minor
Prometheus6’s picture

Status: Active » Closed (fixed)