Coder Social home page Coder Social logo

Comments (6)

oschwald avatar oschwald commented on July 18, 2024

It sounds like there is an error opening the database. Please check that the path to your database is correct and that the file is a GeoIP1 Legacy database.

We will not be rewriting this API.

from geoip-api-php.

etayluz avatar etayluz commented on July 18, 2024

There was in fact an error opening the database due to the fact that many web hosts services simply do not support the fseek function. This is a problem many users are facing which is causing us to turn away from using MaxMind Geo IP. See the posting here: http://www.webdeveloper.com/forum/showthread.php?237568-fseek()-issues-ip-to-location

If it is really impossible to rewrite the API, perhaps there should be a second version of geoip.inc that would use the file_get_contents() instead as a workaround - right now as great as this service is - I simply can't use it :(

On another note, if you work for MaxMind, I would suggest placing a link to this github and explaining to users which inc files need to be included in order to interact with the database - a little more documentation could make it easy to get running with it - http://dev.maxmind.com/geoip/legacy/geolite/ - the link to stack overflow is not very helpful

from geoip-api-php.

oschwald avatar oschwald commented on July 18, 2024

Again, it sounds like you are having problems accessing your database file that are only indirectly related to fseek. fseek is a part of the PHP core and is supported by both PHP 4 and 5. The error message is not saying that fseek is missing, but rather fseek that exists and there is a problem doing a seek on the file handle.

I am closing this issue. If you are a paying MaxMind customer, feel free to contact [email protected]. Otherwise, I would suggest asking for help on StackOverflow or from your hosting provider.

from geoip-api-php.

etayluz avatar etayluz commented on July 18, 2024

If you need to have a special web server to support doing an fseek on a file handle (which my web service does not support as I have contacted them and they apologized for it but couldn't do anything for it), or if you need to have special customer support from MaxMind, then I have to tell you that this is not a legitimate open source project.

from geoip-api-php.

oschwald avatar oschwald commented on July 18, 2024

Your error log does not suggest that your host does not support fseek.

That said, if you did receive a warning of the form "Warning: has been disabled for security reasons", you could try to avoid that function by using the GEOIP_SHARED_MEMORY mode or the GEOIP_MEMORY_CACHE mode.

You are free to fork the project and change the API as you see fit.

from geoip-api-php.

etayluz avatar etayluz commented on July 18, 2024

I opened a stack overflow here:
http://stackoverflow.com/questions/20022743/maxmind-geoip-api-fseek-function-fseek-stream-does-not-support-seeking-in

from geoip-api-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.