PHP

GeoIP extension PHP 7.x + AMI / Redhat / CentOs Linux

GeoIP extension PHP 7.x + AMI / Redhat / CentOs Linux

Small 2019 update – Please check out this library – github.com/maxmind/MaxMind-DB-Reader-php It’s a straight replacement of PHP module. GeoIP extensions is quite use-full, but it requires some server – side magic. If you are looking for something simpler, just go with ipstack.com or something similar – GeoIP . Otherwise: wget http://pear.php.net/go-pear.phar php go-pear.phar We need geoip-devel libraries: yum install geoip-devel And newest (not stable) version of geoip: sudo ./pecl install geoip-1.
Centos PHP 7 LAMP boilerplate

Centos PHP 7 LAMP boilerplate

This time we are going to cook Apache (httpd 2.4), PHP 7.0 as a PHP-FPM . Instructions are pretty simple. You can just copy and paste command to get working stack in less then 15 minutes.

What you can learn from it? How to install Apache 2.4 and PHP 7, how to enable and opcache, and how to install HTTPS on your server, with purchasing SSL certificate.

Caddy rewrite and CodeIgniter

Caddy it’s a new kid in the block in category super light web servers. Personally – I love it. Same love I feel to CodeIgniter . To marge both of them, we need only basic rewrite rule to drop into caddyfile. api.spidersoft.com.au { root /var/www/html/spidersoft.com.au gzip rewrite { to {path} {path}/ /index.php?/{uri} } fastcgi / /var/run/php-sock php }