Comments (6)
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.
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.
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.
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.
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.
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)
- Troubles with installation through composer
- PHP memory requirement HOT 4
- Cannot redeclare geoip_country_code_by_name() HOT 2
- geoip/geoip v1.14 conflicts with ext-geoip[1.0.8] HOT 1
- Timezone ID invalid HOT 1
- Default timezone HOT 1
- Notice about non object HOT 4
- inconsistancy in quotes HOT 2
- Malta ('MT') missing from country / region list HOT 2
- Minimum PHP version HOT 1
- Installation WPML_GeoIP_IPResolver.class.php HOT 1
- Getting region HOT 1
- Missing regions in get_time_zone function HOT 1
- Wrong detection of the IRELAND ips HOT 2
- PHP Warning: fseek(): 16 is not a valid stream resource HOT 2
- strpos(): Non-string needles will be interpreted as strings in the future. HOT 1
- Dependabot can't resolve your PHP dependency files HOT 1
- Dependabot can't resolve your PHP dependency files HOT 1
- Not compatible with PHP 8.0.0 RC1 HOT 3
- CentOS7 and PHP8.0 geoip.c: ‘OnUpdateDirectory’: HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geoip-api-php.