mod_geoip not setting environmental variables
Compiled mod_geoip as stated in the ModGeoip Docs, but it's not setting the env as it should, the lighty config:
server.modules = ( ... "mod_geoip", ... ) geoip.db-filename = "/usr/share/GeoIP/GeoIP.dat" geoip.memory-cache = "enable"
to test that if module is working, I'm using this script:
#!/usr/bin/env ruby require 'pp' require 'rubygems' require 'geoip' pp ENV DB = GeoIP.new("/usr/share/GeoIP/GeoIP.dat") country = DB.country(ENV['REMOTE_ADDR']) pp country
the ENV shows nothing about geoip, but the same database, using the ruby bindings of the geoip library, works as supposed. Testing using the ubuntu 8.10 lighttpd package.
Updated by stbuehler over 10 years ago
- Target version deleted (
How can you test with the ubuntu package if you needed to compile it yourself?
And 1.4.19 is pretty old... try it again with 1.4.22
And "Target version" is not the same as "affected version".
Apart from that mod_geoip is still a third pary module and not officially supported.
Updated by rolando over 10 years ago
since the only way to install mod_geoip is to compile it, I used debian-based tools (read: apt) to get the source, recompile and create another .deb package.
I will have to recompile and install by hand a newer version and test it. Although, you might want to check the forums, since there's another person with the same issue.
Updated by natethelen about 10 years ago
I am also seeing this using fast-cgi and flup (python). I have traced it back to the raw socket read and none of the GEOIP_* FCGI_PARAMS are being sent through. What is weird is that they are passed through to PHP when run via fast-cgi with all else equal on the same box
Updated by gstrauss over 3 years ago
- Category set to 3rd party
- Status changed from New to Missing Feedback
mod_geoip adds variables to an environment array internally and that array is what is used for CGI, FastCGI, and SCGI, so if it is working in some cases and not others, I would suggest looking at your module load order to make sure geoip is run before those modules.
I uploaded a version of mod_geoip to https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModGeoip which compiles against lighttpd 1.4.39.
If this is still an issue for you, please reopen ticket with more details on how to reproduce.
Also available in: Atom