Hi.

I just installed the ad module, and the geo_ip pack was installed by the server guys at hotdrupal.com.

When clicking Admin->Create Content->Advertisement->html advertisement I get the following error:

"warning: geoip_db_avail() expects parameter 1 to be long, string given in /home/proudplu/public_html/sites/all/modules/ad_geoip/ad_geoip.module on line 104."

Any idea why this is happening?

Thanking you.

Shay.

Comments

jeremy’s picture

Project: Advertisement » Ad GeoIP
Component: installation » Miscellaneous
Status: Active » Postponed (maintainer needs more info)

Moving this issue to the correct project.

Visit Administer >> Logs >> Status Report for more information. The error suggests that the PHP bindings are not properly installed. You must follow all the directions in INSTALL.txt that comes with the module for a complete installation.

bnice5000’s picture

I am getting the same error message:

warning: geoip_db_avail() expects parameter 1 to be long, string given in /web/alpha/sites/all/modules/ad_geoip/ad_geoip.module on line 104.

The status under logs is green with a check mark and states:

GeoIP GEO-106FREE 20081001 GeoIP Country Edition

I am using Ubuntu 8.04.1 with the standard AMP build. Any other information that I can give let me know.

xgretsch’s picture

This bug is happening because there is an error in a constant: line 101 (or thereabouts) of the file ad_geoip.module should be changed from:

$dbs = array(GEOIP_CITY_EDITION_REV0, GEOIP_CITY_EDITION_REV);

to

$dbs = array(GEOIP_CITY_EDITION_REV0, GEOIP_CITY_EDITION_REV1);

That removed the error for me - the constant without the REV was clearly not defined!

jeremy’s picture

Status: Postponed (maintainer needs more info) » Fixed

Thanks, fix committed in the 5.x-1.x-dev and 6.x-2.x-dev branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.