Dear All
When adding items to amazon module i get this error

Fatal error: Call to undefined function curl_init() in W:\www\mysite.com\modules\amazontools\amazon.php5.inc on line 307

Comments

Prometheus6’s picture

Category: bug » support
Priority: Critical » Normal

Your PHP installation needs the optional CURL module to be enabled.

You also need the optional DOM XML module too, if you're running PHP4.

abqaria’s picture

Thanks

I am using the uniform server for windows, do u have any idea how to install curl

Prometheus6’s picture

Look for this in your php.ini file:

;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
;
;extension=php_bz2.dll
;extension=php_cpdf.dll
;extension=php_crack.dll
;extension=php_curl.dll

Uncomment that last line

abqaria’s picture

i did enable it but i get this message

unable to load dynamic library '/usr/local/PHP/extensions\php_curl.dll the specified module could not be found

Prometheus6’s picture

Assigned: Unassigned » Prometheus6
Status: Active » Fixed

Okay, first of all, that path '/usr/local/PHP/extensions\php_curl.dll' doesn't look like it comes from a Windows box, so I may have misunderstood you when you said you're using "the uniform server for windows."

If you're on a Windows box, the php_curl.dll file is in the ext subdirectory of your PHP5 install directory. On a Linux box or the equivalent you'll looking for shared objects...I believe that would be php_curl.so. Either way, add the directory where you found it to your PATH, or find this in your php.ini

; Directory in which the loadable extensions (modules) reside.
extension_dir = "./"

and change it to this

; Directory in which the loadable extensions (modules) reside.
extension_dir = "./;path_to_the_directory_your_extensions_are_in"

That said, you should read the php.ini-recommended file that ships with the install. Very educational.

abqaria’s picture

Dear Sir
I got missing files from php5.1.1

and it worked

i did get books on my local host
but after clicking import books what happens next ?

Prometheus6’s picture

Status: Fixed » Closed (fixed)

First make sure you have an Amazon Associate ID or the whole thing is pointless.

The books you imported are now nodes that can be dealt with the same was as any other node. You have a couple of blocks to work with as well.

abqaria’s picture

the only block that works is "we read" but the random book and recommended book does not work

Prometheus6’s picture

The "recommended book" block only pulls from books and reviews that are rated equal or better than some rating you can set in the block's configuration; edit the amazon_node record to rate the book. The random book IS the block titled "We read". You can change the titles of the blocks if you like.