Got this fatal error when running the amazon cvs on Drupal 4.6.6:

Fatal error: Call to undefined function: drupal_get_form() in /home/blogc2/public_html/modules/amazontools/amazon.module on line 1234

CommentFileSizeAuthor
#7 amazontools.zip23.58 KBPrometheus6

Comments

heine’s picture

Category: bug » support

Amazon CVS doesn't work on Drupal 4.6 because it calls functions specific for Drupal 4.7

amok’s picture

Assigned: amok » Unassigned

I guess I should have figured that. But when I use amazontools 4.6 I get this error after filling out the form to search:

Fatal error: Cannot access undefined property for object with overloaded property access in /home/blogc2/public_html/modules/amazontools/amazon.php5.inc on line 187

CURL & DOMXML are enabled and I am using Drupal 4.6.6, PHP 5.0.4 & MySQL 4.1.14-standard

Prometheus6’s picture

Are you searching from search/amazon or admin/amazon_import?

amok’s picture

That error occurs with both, plus when I try to add an amazon node, review, etc.

Prometheus6’s picture

Okay, you've got a different kind of situation going on.

CURL & DOMXML are enabled and I am using Drupal 4.6.6, PHP 5.0.4 & MySQL 4.1.14-standard

With PHP5, the DOM XML module is depreciated...not shipped in fact. In its place the DOM extension is enabled by default. They are not compatible.

The difference between amazon.php4.inc and amazon.php5.inc is the former uses DOM XML to implement its functions and the latter uses DOM. amazon.module checks the php version and uses it to decide which to include. If you really have DOM XML enabled with PHP5 (more than possible) renaming amazon.php4.inc to amazon.php5.inc should do it.

amok’s picture

Thanks for the reply & the help Prometheus6:

I renamed amazon.php4.inc to amazon.php5.inc and this error occured.

Fatal error: Call to undefined function: domxml_open_mem() in /home/blogc2/public_html/modules/amazontools/amazon.php5.inc on line 313

Prometheus6’s picture

StatusFileSize
new23.58 KB

Try this.

I've worked a lot of code since that module was branched. The attached file is where AAT was when the Form API reared its ugly head.

amok’s picture

Ok,

I reinstalled everything and ran it as is and got:

Fatal error: Cannot access undefined property for object with overloaded property access in /home/blogc2/public_html/modules/amazontools/amazon.php5.inc on line 199

I also tried re-naming php4.inc to php5.inc again:

Fatal error: Call to undefined function: domxml_open_mem() in /home/blogc2/public_html/modules/amazontools/amazon.php5.inc on line 327

Thanks again for the help.

Prometheus6’s picture

I can't duplicate this at all.

You're going to have to tell me what you're searching for. Your query isn't returning any items, according to the error message. If you're searching for books and haven't modified the code then it will be a difference between our PHP versions...I'm running 5.1.2.

amok’s picture

Thank you for the help. I'll try and keep plugging away at it.

Prometheus6’s picture

Status: Active » Closed (fixed)