I'm trying to get the Ad GeoIP module working, and to do this, I have to install the PHP geoip extension. I'm running apache under OS X 10.5.5.
The process is pretty tortuous (and will be the subject of a "how to" blog if I ever succeed in completing it), but I appear to have got through all the required steps, resulting in a properly compiled geoip.so file in my PHP extension directory, and the appropriate "extension=geoip.so" line in my php.ini. And indeed, if I type "php -i" from the command line, geoip 1.0.3 is suitably present and correct.
But here's the snag - only from the command line. Operated from a web browser, phpinfo() shows no sign of it. The other extension (gd.so) appears just fine - but geoip is invisible. And indeed, the Drupal Ad GeoIP module can't find it either. As far as I can see, the other results from the two versions of the info screen are identical. I've tried a reboot of the whole OS, but to no avail.
Do any of you PHP experts have any idea how this can happen? I assumed the command line and web server versions of the info function were pointing at the same place, but evidently not!!! Or I'm doing something *really* stupid that I can't spot!!!
Thanks for any ideas
David
Comments
Clarify - there's an error message in the Apache log
Looking at this again, I can see the following error in the Apache log whenever Apache starts:
Once again, only from the web server, not from the command line. Does anyone know what this error means?
xgretsch
Check these
I cant say I'm experienced with any version of Apple OS, but my guess would be that the file location is wrong. Does the file
actually exist? If it does, does the user that the web server is running as have access rights to it?
If its not those two, then I cant say what it would be.
Checked those already, I'm afraid
The file does exist and has the right access rights. My guess at the moment is that the path is different: my command shell gets several directories into the path, one of which (/opt/local/bin) has some geoip-related files in it. I've tried putting symbolic links to these in a directory in what Apache thinks is the path, to no avail.
xgretsch
Please elaborate on the "how to"
David, could you elaborate on the "how to" you alluded to? I am struggling right now with trying to create the Apache mod_geoip.so for OS X 10.5.5. When I follow the instructions that came with mod_geoip2_1.2.2:
, it creates the extension and installs it in /usr/libexec/apache2. But then here's what I get from 'apachectl configtest':
Wrong architecture?!
Success?
Did you figure out how to get GeoIP going under Apache on Leopard? Did you write the How to? TIA.