PHP FPM Errors After Upgrade

Recently I noticed a few of my servers had stopped serving my sites, with¬† 502 errors being to visitors. I took a look at my site logs and noticed that they were full of the “Permission Denied” errors below: 2014/06/09 09:45:17 [crit] 11453#0: *22 connect() to unix:/var/run/php5-fpm.sock failed (13: Permission denied) while connecting to upstream A little more investigation and I found that a privilege escalation issue in the PHP default fpm configuration had been found. This had consequently been fixed in the latest releases. But unless a systems administrator is paying attention and knows that changes to the config are required, upgrading the PHP instance leads to a broken web server. […]

By |June 10th, 2014|PHP, Security, Sysadmin|0 Comments

Quick Intro To Memcached Stats

A few days ago I was given the job of changing the caching engine used in a Zend Framework based application from a simple flat file system based caching system to a memcached based object store that could be used by multiple servers. After extending the existing application bootstrap file to support the new cache [...]

By |May 19th, 2014|Programming, Sysadmin|0 Comments

PNG Crush: PNG image optimisation script

Building a Cordova based mobile application recently at work we were facing an issue with an application size that was literally growing by the day. The project leveraged a lot of PNG templates sent to us by the design department and these template files were contributing about 50mb to the total size of the application. [...]

By |March 27th, 2014|Web, web development|0 Comments

Linux CLI: File Text Search & Replace

Occasionally you need to change the contents of some files easily to save a lot of manual work. In my case it was a server migration, the old IP address of a server was referred to from numerous DNS records. This meant the contents of a couple of hundred Bind zone files would also have to change so that they would reflect the new server address. This is task that would take way too long to do manually, luckily grep and sed can automate the process. In this post I will show you how to recursively search for and change a string in all files that exist below a directory. The format for doing a recursive search / replace looks like: grep -rl ‘search_term’ ./ | xargs sed -i ‘s/search_term/replacement_text/g’ […]

By |December 19th, 2013|Linux|0 Comments

Tunnelling data over SSH with Putty

An SSH tunnel is used to route unencrypted traffic through an encrypted SSH channel. Its comes in handy for routing traffic over untrusted or hostile networks as the data is encrypted to maintain privacy and prevent eavesdropping. It is also very handy in for bypassing firewall restrictions on networks where the usage of certain services [...]

By |December 16th, 2013|Security, Uncategorized|0 Comments

Encypting Diectories With eCryptfs

eCryptfs is an encrypted file system that works at the file system level. In this post I am going to cover the basic usage of eCryptfs and some of the situations you may want to think about using a encrypted file system. What is an encrypted file system? File system encryption protects information by converting [...]

By |December 14th, 2013|Linux|0 Comments

Installing SVN support in Aptana Studio 3

Its been a few years since I have worked anywhere that still uses Subversion as their day to day version control system. But the other day at work I needed to check out some old legacy code which was stored in a svn repository on an old development server. Then it struck me I didn’t even have subversion available on my work machine! I could have simply installed it from the command line but I use to like have the ability to compare code across multiple revisions directly within my IDE. Here I am going to cover off the required steps to getting support for Subversion installed into Aptana Studio 3. […]

By |September 5th, 2013|Programming|0 Comments

Debugging Web Applications With Fiddler On Linux

Fiddler is by far one of the most popular web debugging proxies available. It allows you to capture, examine, save, edit and replay all HTTP / HTTPS¬† requests made by a web based application. For many years it was available only on Windows systems. But recently the creator of Fiddler, Eric Lawrence has released a version of Fiddler that runs using the mono runtime allowing it to run successfully on MacOS and Linux platforms. In this post I am going to run through the basic setup and usage of fiddler under Linux (I am using Linux Mint 15 the process should not vary too for other Debian based variants though). First up visit the fiddler site and download the alpha mono version of the application. After downloading unzip the package and copy the mono version of fiddler to the directory where you would like it to live on your system (I am simply using a folder named Software in my home directory). […]

By |August 28th, 2013|Linux, web development|2 Comments

Adding MP3 Support To K3b

Being sick of the music selection in my car the other day I decided I needed for fresh blood. But not being motivated enough to replace the car stereo with one that has an auxiliary input. I tried to simply burn a few mp3 files onto a blank CD. Dragging the files into K3b instead resulted in the error below: […]

By |August 22nd, 2013|Linux|0 Comments

Installing Safari on Linux Mint 15

Cross browser testing your sites is unfortunately a necessary evil. Installing virtual machines with the required browsers installed is one way to test your code. But a lot of the time I don’t want to wait for a VM to boot just to quickly test something. In this article I will run you through the process of getting the Windows version of Safari running under Wine on Linux Mint 15. Which will hopefully save some time waiting for virtual machines to boot up. To get started simply open a terminal and execute: sudo apt-get update sudo apt-get install playonlinux […]

By |August 13th, 2013|Linux, web development|0 Comments