The Gearman PHP module is the last piece of dependency missing in our stack before we can consider moving to PHP7. I’m currently testing Ubuntu 16.04 Xenial on PHP7 and unfortunately, the gearman module is not yet available on official repo. To proceed testing, I just compile it in my Docker image.
I’m installing the Gearman client on top of my existing PHP7 + Apache container on Docker hub: https://hub.docker.com/r/lysender/php7-apache/.
The idea to compile it is based on this thread: https://github.com/hjr3/pecl-gearman/issues/12.
Here is the additional commands to run to install the Gearman module.
# Install additional packages for compiling
apt-get -y install wget unzip re2c libgearman-dev
# Install from source
mkdir -p /tmp/install
echo "extension=gearman.so" > /etc/php/7.0/mods-available/gearman.ini
phpenmod -v ALL -s ALL gearman
rm -rf /tmp/install/pecl-gearman-master
# Verify if module is really installed
php -m | grep gearman
While waiting for the official release, will live with manually compiling it.
Enjoy and share!
Posted in Linux, php
Tagged docker, gearman
Coming from SublimeText, I missed opening an editor window and start typing or copying and pasting content that I would throw away later. With PHPStorm, you have to create a new file under the project. However, a handy plugin comes … Continue reading
I’ve been curious about this Magnet link stuff and I decided to give it a try after some feedback that the usual torrent file does not work. I though that this magnet links are some sort of scam that extort … Continue reading
I just got my account put under review due to alleged suspicious activities on my Paypal account. I’m always using PrivateInternetAccess VPN with a US IP for the purpose of security and most importantly, to have a stable connection! It … Continue reading
Last night when I was trying to upload a new profile pic in our app, S3 uploads suddenly stopped working. Other S3 API methods are working fine except for the upload or PUT method. I have done many changes on … Continue reading
My goal is to validate a $_FILES array where uploaded file is an array of files. Due to the weird format of the $_FILES array for array version of the upload file, I have to validate each fields so that … Continue reading
This is a continuation of our previous post regarding a simple application running inside a Docker container. This post focuses on the database part of the application stack. Yes, we run the database in a separate container! MariaDB I’m using … Continue reading
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
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
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