Liquibase – Source control for your database

Many PHP, Python and Ruby frameworks already have their database source control feature either built-in or supported as a plugin. In our case, we didn’t use (PHP) CodeIgniter’s built-in database migration tool nor use any migration tool at all until … Continue reading

Posted in Database, MySQL, Web Development | Tagged , , , , | Leave a comment

MySQL – Locking reads using transaction

Here is a quick post before I hit work on a Sunday afternoon. I was trying to create some sort of locking mechanism designed to trigger the same tasks from multiple clients but only one should be executed/run. I tried … Continue reading

Posted in Database, MySQL, Web Development | Tagged , | Leave a comment

Using Symfony Validators outside the Symfony Framework

While we are quite doing fine with our current framework, we are stuck in terms of data validation especially when validation is done deep inside several layers of model classes. I’ve been thinking of either using Zend Validate classes (ZF2) … Continue reading

Posted in Web Development | Tagged , , , , | Leave a comment

Using Assetic to manage CSS and JS

We’ve been using Assetic for some time and we’re quite happy with the results. Assetic can be used to consolidate your CSS and JS files into fewer files with options to minify (compress) them to minimize the file size and … Continue reading

Posted in CSS, JavaScript, Site Optimization, Web Development | Tagged , , , | Leave a comment

Importing Third Party Fonts like Google Fonts – put them on top

We were using a theme for quite some time which uses Google fonts. There are no issues encountered until the number of CSS files increases too much that we need to consolidate them into 1 or 2 CSS files. This … Continue reading

Posted in CSS, Web Development | Tagged , , , | 3 Comments

A sample application running on Docker container – part 1

I’ve been using Docker for several months on my development and production environments. With Docker, I’m able to run multiple PHP applications, Django apps and RabbitMQ messaging containers simulteanously without having to deal with software package conflicts. I’d like to … Continue reading

Posted in Linux, php | Tagged , | 1 Comment

PHP – Instantiate a class from a string with namespace

I know this is old but I just learned it today. Instantiating a class from a string requires a full namespace of the class, otherwise it won’t work. You cannot use a namespace to make shortcuts. See example below. Shortcut? … Continue reading

Posted in php, Programming | Tagged , | 3 Comments

CentOS 7 + SELinux + PHP + Apache – cannot write/access file no matter what

I’ve spent 2-3 hours pulling my hair trying to setup a supposed to be simple PHP/MySQL web application on an Amazon EC2 instance running on CentOS 7. Apache logs keep saying that it can’t write to file due to permission … Continue reading

Posted in Linux | Tagged , , , , | 44 Comments

jQuery DataTables – sort by date using timestamp data attribute

DataTables is an awesome “do-it-all” table plugin for jQuery. I was trying to display a locally formatted date but should still be sorted correctly. Current plugins may not work since it the date format uses long date format like “20 … Continue reading

Posted in JavaScript, Web Development | Tagged , , | Leave a comment

Pag-IBIG contributions – paying through payment centers?

Few days ago, I was thinking of paying my Pag-IBIG monthly contributions via third party payment centers. However, I’m hesitant to try. Today, I made up my mind and went to Pag-IBIG office to pay and at the same time, … Continue reading

Posted in Personal Blog | Tagged , , | Leave a comment