Categories
GIDBlog Learning Journal

Compress your PHP-FPM pages

Since the recent upgrade to gidblog.com, this web site is currently being hosted by various Docker containers. One of the Docker containers used is, of course, one derived from a Docker image like php:7-fpm-alpine.

I must confess that this is my first endeavour using PHP-FPM with Apache. All these years I have only been using the Apache module: mod_php to handle all my PHP web pages.

Categories
GIDBlog Learning Journal Money

WordPress Plugin for Google AdSense Auto Ads

I will show you how I inserted Google AdSense Auto Ads JavaScript ad code to this web site today.

The Google AdSense Auto Ads ad code is only a single line long, so it was unnecessary to get overly complicated with the plugin or PHP code.

Categories
GIDBlog Learning Journal

WordPress Plugin for Google Analytics

I will show you how I inserted Google Analytics tracking code to this web site today.

I chose to write a WordPress plugin to accomplish this task but since I only manage 2 WordPress sites, I didn’t develop it with a lot of bells and whistles.

Categories
Learning Journal

yii-user Extension “include(UserModule.php): failed to open stream” Error

Creating a new (Yii) controller and implementing access control for it with the yii-user extension, I got this PHP warning/error today:

Categories
Learning Journal

Yii Exception: Alias “user.UserModule” is invalid

I was attempting to get the Yii Framework yii-user extension working for a test web site earlier today when I got this fatal error / exception message:

Categories
Learning Journal

Class ‘HttpResponse’ Not Found

After I “upgraded” Fedora (to Fedora 19) on my main PC recently, I only had one other essential post-installation task to complete before I could get back to my regular programming on this machine. I just had to install the pecl_http PHP extension next.

Categories
Learning Journal

Match IP in CIDR

Recently, I needed a simple PHP function that will match an IP Address in a CIDR block.

Categories
Learning Journal

Multiple SQL Inserts in 1 Query

If your MySQL version is 3.22.5 or later, you can now INSERT multiple values / records in one single query. In most cases this is probably not useful but I recently found this out while trying to optimise my GIDTopsites script.

Categories
GIDApp

GIDApp No. 2

For my second Android™ project/application, which will remain unnamed for the moment, I will first need to gather some historical data from more than a couple of local (Malaysian) web sites. Some of this publicly available data go back as far as as 1985! It is insane to even contemplate fetching all this data by hand and so I had to come up with some kind of software to help me do that easily and quickly.

Categories
Learning Journal

Refresh / Redirect with PHP

We know how to use theĀ Refresh meta tag in our <head> tags. But what if we needed to do the same thing, only this time, do it in PHP?