{"id":148,"date":"2013-09-01T12:25:58","date_gmt":"2013-09-01T11:25:58","guid":{"rendered":"http:\/\/chewett.co.uk\/?p=148"},"modified":"2013-09-02T22:42:10","modified_gmt":"2013-09-02T21:42:10","slug":"location-geoip-dat-php","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/148\/location-geoip-dat-php\/","title":{"rendered":"Location of GeoIP.dat for PHP"},"content":{"rendered":"<p>To find the location of GeoIP for PHP you can ssh into the server and use the &#8220;find&#8221; command.<\/p>\n<pre>find \/ -iname GeoIP.dat<\/pre>\n<p>Will return a list of file paths where the file with this name is found. In my case I found:<\/p>\n<pre>\/usr\/share\/GeoIP\/GeoIP.dat\r\n\/usr\/local\/share\/GeoIP\/GeoIP.dat\r\n\/opt\/geoip\/share\/GeoIP\/GeoIP.dat<\/pre>\n<p>In my case the bottom link was the one that PHP was searching for, To confirm this i moved the file and PHP started to complain that it couldn&#8217;t find the file.<\/p>\n<p>Previously because I was updating the wrong file it didn&#8217;t update my install so PHP was returning old and wrong data.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To find the location of GeoIP for PHP you can ssh into the server and use the &#8220;find&#8221; command. find \/ -iname GeoIP.dat Will return a list of file paths where the file with this name is found. In my case I found: \/usr\/share\/GeoIP\/GeoIP.dat \/usr\/local\/share\/GeoIP\/GeoIP.dat \/opt\/geoip\/share\/GeoIP\/GeoIP.dat In my case the bottom link was the one [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[68,65,67,39,66,69],"class_list":["post-148","post","type-post","status-publish","format-standard","hentry","category-informational","tag-apache","tag-centos","tag-geoip","tag-linux","tag-php","tag-whm"],"wppr_data":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-2o","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":519,"url":"https:\/\/chewett.co.uk\/blog\/519\/configuring-teamcity-php-project\/","url_meta":{"origin":148,"position":0},"title":"Configuring TeamCity for a PHP project","author":"Chewett","date":"September 16, 2017","format":false,"excerpt":"This post describes configuring TeamCity for a PHP project using composer. Setting up continuous integration of unit testing from a git repository. Setting up PHP, composer and git The first step to running your PHP project on TeamCity is installing PHP and the appropriate\u00a0libraries. The only requirement for this is\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/09\/configuring_php_unit_testing_with_teamcity.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/09\/configuring_php_unit_testing_with_teamcity.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/09\/configuring_php_unit_testing_with_teamcity.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/09\/configuring_php_unit_testing_with_teamcity.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3073,"url":"https:\/\/chewett.co.uk\/blog\/3073\/celebrating-30-years-of-php-highlights-from-jetbrains-phpverse-2025\/","url_meta":{"origin":148,"position":1},"title":"Celebrating 30 Years of PHP: Highlights from Jetbrains PHPVerse 2025","author":"Chewett","date":"July 6, 2025","format":false,"excerpt":"This year I (virtually) attended Jetbrains PHPVerse 2025 celebrating 30 years of PHP. I have written about two sessions which most interested me. 30 Years of PHP To celebrate 30 years of PHP, Jetbrains brought together a number of speakers to talk about PHP's past successes and the future of\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2025\/07\/phpverse-4.webp?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2025\/07\/phpverse-4.webp?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2025\/07\/phpverse-4.webp?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2025\/07\/phpverse-4.webp?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2025\/07\/phpverse-4.webp?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2952,"url":"https:\/\/chewett.co.uk\/blog\/2952\/running-a-python-script-on-boot-with-systemd\/","url_meta":{"origin":148,"position":2},"title":"Running a Python Script on Boot with Systemd","author":"Chewett","date":"August 7, 2021","format":false,"excerpt":"This short blog post details how you can run a python script on boot using systemd. Using Systemd to manage the python script Systemd is a daemon that is used to control various aspects of services and initialization scripts that run on and after boot. It is used by a\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/07\/systemd_bootup_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/07\/systemd_bootup_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/07\/systemd_bootup_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/07\/systemd_bootup_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/07\/systemd_bootup_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2002,"url":"https:\/\/chewett.co.uk\/blog\/2002\/raspberry-pi-cluster-node-12-automatic-start-with-rc-local\/","url_meta":{"origin":148,"position":3},"title":"Raspberry Pi Cluster Node \u2013 12 Automatic Start with rc.local","author":"Chewett","date":"March 6, 2019","format":false,"excerpt":"This post builds on\u00a0my previous posts in the Raspberry Pi Cluster series by creating a script which automatically starts the slave and master with rc.local. What is the rc.local file? The rc.local file is used on many Linux operating systems to schedule operations to run after services are started on\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/rpi_cluster_12_automatic_start.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/rpi_cluster_12_automatic_start.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/rpi_cluster_12_automatic_start.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/rpi_cluster_12_automatic_start.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1221,"url":"https:\/\/chewett.co.uk\/blog\/1221\/how-combining-php-flags-works-for-function-calls\/","url_meta":{"origin":148,"position":4},"title":"How combining PHP flags works for function calls","author":"Chewett","date":"June 2, 2018","format":false,"excerpt":"Here I talk a bit about how combining PHP flags work and why we use a vertical bar to combine them. What can flags do with functions? Some PHP functions have a parameter called $options that allow changing how it operates. One or many flags can be passed into this\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/combining_flags_php.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/combining_flags_php.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/combining_flags_php.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/combining_flags_php.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2360,"url":"https:\/\/chewett.co.uk\/blog\/2360\/learning-points-from-writing-my-own-js-css-caching-system\/","url_meta":{"origin":148,"position":5},"title":"Learning points from writing my own JS\/CSS caching system","author":"Chewett","date":"June 19, 2021","format":false,"excerpt":"This post talks about the various points I have learned from writing my own caching system, Cache-N-Crunch. Why write your own caching system? A while ago I wanted to minify the JavaScript and CSS on a website I worked on. The obvious solution would be to use one of the\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/06\/caching_js_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/06\/caching_js_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/06\/caching_js_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/06\/caching_js_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/06\/caching_js_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=148"}],"version-history":[{"count":2,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/148\/revisions"}],"predecessor-version":[{"id":150,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/148\/revisions\/150"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}