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…
Read More
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…
Read More
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…
Read More
Tracing Email Sending PHP Scripts On Servers
It happens sometimes, a server you are responsible for seems to be sending out spammy emails, and its normally caused by legacy or insecure code. The mail log indicates there are plenty of potential spam messages going out that are originating locally but most Linux servers host a lot of…
Read More
Speeding Up Google SDK Manager Downloads
I have been doing some work developing Android applications with Phonegap over the last few weeks. Getting the Eclipse and ADT is always a breeze. Downloading the required Android SDK libraries using SDK manager is always a pain though the speeds seem to be terrible, with the required time to…
Read More
Empty Directories In Git
Occasionally when working on a code base the application at hand requires a directory for the storage of log files, uploads etc. You often like to keep the directory itself in the repository but you don’t want any of its contents that have a temporary lifespan making their way into…
Read More
Useful Keyboard Shortcuts For Aptana Studio
The last couple of years I have been using Aptana Studio exclusively as my IDE of choice, after deciding it offered the power of Eclipse in a more user friendly format. I find the standard Aptana theme very easy on the eyes when coding for long amounts of time. Unfortunately…
Read More
Executing PHP Code Server Side In .html Files
On a recent project we needed to provide a client our contribution to the site code base as static .html files. To make the development process easier though a number of the developers wanted to include some of the global page assets such as the header and footer using PHP…
Read More
Easy PHP File Extensions With PathInfo
The other day I was building some file handling functionality into a project I was working on when i came to thinking about the best way to retrieve the extension of a filename with PHP. The first approach that came to mind was using explode statement to split the string…
Read More
PHP CGI 504 Gateway Timed Out Errors With Nginx
Recently I noticed that the nginx error log for a site I was working with was filling up with timeout messages similar to below: 2012/07/06 17:21:01 [error] 23897#0: *8870 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 173.25.1.129, server: project.com, request: “GET /jobs/update HTTP/1.0”,…
Read More