Fatal error: Call to undefined method DOMElement::first_child() in E:\DomZeus\sitebuddycom\wwwroot\modules\amazontools\amazon.php5.inc on line 111

The php site says:
"This extension has been moved to the PECL repository and is no longer bundled with PHP as of PHP 5.0.0.'

The PERL repository http://pecl.php.net/package/domxml says:
"This extension allows you to operate on an XML document with the DOM API. It has been superseded by the DOM extension that ships with PHP 5.
Although it should be possible to use this old domxml extension with PHP 5, its use is highly discouraged, as there a very high potential for conflicts with the new dom extension.

If you are migrating from PHP 4 to PHP 5, the recommended best-practice is to port your domxml code to the much better dom code."

Also for PHP5 no distribusion: "If you really must build domxml, you will need to obtain the sources from CVS and build them yourself."

Thanks for this great module,
Christophe D

Comments

Prometheus6’s picture

Assigned: Unassigned » Prometheus6

I updated the PHP5 include file and added it to the 4.7 package. I am NOT running PHP5 at the moment, but the changes from the 4.6 and 4.7 versions are minor.

Give it a try and let me know if there are any problems.

chrisd’s picture

Where is the updated include for PHP 5 ?

Looked here:
http://drupal.org/node/18842
and here:
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/amazontools/

Thanks,
Christophe D

Prometheus6’s picture

Sorry, I'm an idiot.

http://cvs.drupal.org/viewcvs/drupal/contributions/modules/amazontools/a...

It should be in the 4.7 download shortly.

chrisd’s picture

No problem Prometheus6.

I'm still getting:

Fatal error: Call to undefined method DOMElement::first_child() in E:\DomZeus\frenchfriendsinfo\wwwroot\modules\amazontools\amazon.php5.inc on line 111

I changed line 328 to ( I do not know PHP...so I'm like a blind man....):
$domdoc = new DOMDocument;
return $domdoc->loadXML(amazon_get_XML($Amazon_Params));

Now I get:
Fatal error: Call to a member function getElementsByTagName() on a non-object in E:\DomZeus\frenchfriendsinfo20169\wwwroot\modules\amazontools\amazon.php5.inc on line 196

Thanks,
Christophe D

PS: I got the lateat version
/* $Id: amazon.php5.inc,v 1.7 2006/02/07 00:02:10 prometheus6 Exp $ */

Prometheus6’s picture

Okay, I had missed converting one function from PHP4 to PHP5 compatibility. I just committed a update that should take care of it.

Prometheus6’s picture

Status: Active » Closed (fixed)