Fatal error: Call to undefined function: domxml_open_mem() in ~/celticess.net/modules/amazontools/amazon.php4.inc on line 319

I have it set in the amazon settings for canada. It seems to pop out this error when I try to use the amazon import. I put in the search term trying "subject" or "title" and simply imput "sims" the result was this error. I thought it might of been giving me an error because I had "amazon item" module installed so I deleted that. Yet this error remains. I'm using the latest stable drupal.

The line in the php it refers to is(lines 317-322):

  */
  function amazon_get_DOM($Amazon_Params) {
    return domxml_open_mem(amazon_get_XML($Amazon_Params), DOMXML_LOAD_PARSING);
  }

  /**

Comments

Prometheus6’s picture

Ask your host to make sure the DOM XML module is enabled. It's optional with PHP4, unfortunately. Without that, and the CURL module, this one can't function.

celticess’s picture

It is running it

Template::Plugin::XML::DOM (2.6) - Plugin interface to XML::DOM

from: https://panel.dreamhost.com/kbase/index.cgi?area=996&keyword=dom%20xml

And also curl

libcurl 7.9.5 (OpenSSL 0.9.6c) (ipv6 enabled)

from: https://panel.dreamhost.com/kbase/index.cgi?area=2847&keyword=curl

and they support a variety of other modules, etc:

https://panel.dreamhost.com/kbase/index.cgi?area=996&keyword=dom%20xml

Prometheus6’s picture

You're listing Perl modules. Drupal is written in PHP, so you need to be asking about installed PHP modules.

celticess’s picture

Sorry didn't realize as I don't normally poke around apache. I had my boyfriend who does have his own personal bsd server with apache check into the hosting we use. It is running XML module and has DOM built into that apparently. Our hosting does run both php4 and 5. We use php 4.3.10 and he just looked at switching it to 5 but saw that the DOM things change.

celticess’s picture

Status: Active » Closed (fixed)

Ooops sorry on finer checking he found out that our server is set odd. We could go to php 5 but then module names, etc change. In the php 4 we have DOM is installed and an older XML but not DOM XML which is it's own module. So I'll shut this bug because likely that is what's causing this. Again sorry about that as I had looked in my hosting knowledge base and thought the needs for this mod were met. :(

Prometheus6’s picture

Okay, first of all you should have a module named domxml available with PHP4...it may not be uninstalled.

Second, if you do choose to run PHP5 you'll be fine. The functions that use DOM or DOM_XML are in seperate files that are used accordingly by the module.

It's noted in the readme and on the project page, but you need the CURL module too. It's another module that I thought was universal, yet isn't...even though it makes no sense for it not to be.

celticess’s picture

I switched to php5 and it works great though it seems to only be showing books in search results. Ah ha if I do use create node it does seem to allow me to add in software and other things as it simply goes on the ASIN.