-
Apache Config: .htaccess or Virtual Hosts?
12 April 2012
Read moreHow to set apache configuration for your web projects? Some settings have to be in the main apache config or in a virtual host, but for many others you have two good choices; either use an `.htaccess <http://httpd.apache.org/docs/2.2/configuring.html#htaccess>`__ file, or …
-
Adding Custom Headers to Every Request with Chrome
10 April 2012
Read more
I'm working on an API which uses OAuth2, but it also has an HTML output handler so I actually do quite a lot of my development in the browser for read-only stuff (I wrote an earlier article about output handlers including the HTML output handler). I fell across an extension … -
Book Review: MongoDB and PHP
05 April 2012
Read moreDespite having been toying with MongoDB and PHP for quite a while, I've only just picked up and read the "MongoDB and PHP" by Steve Francia, published by O'Reilly (disclaimer: I've collaborated with Steve on a few articles and he sent me a copy of the book to read)
-
Using OAuth2 for Google APIs with PHP
29 March 2012
Read moreI've been working on something recently where I'm pulling information from lots of places onto a dashboard. Each API has its own little quirks so I'm trying to write up the ones that weren't idiot-proof, mostly so I can refer back to them later when I need to maintain my system!
I've written about Google and OAuth before, but that was OAuth v1.0, and they are introducing OAuth2 for their newer APIs; in this example I was identifying myself in order to use the Google Plus API (which turns out not to do anything you'd expect it to do, but that's a whole separate blog post!).
-
Using JIRA's REST API to Create a Dashboard
26 March 2012
Read moreIf you read this blog often, you'll know that I am:
crazy about APIs
living with some accessibility issues
Put these two things together and what do you get? Actually don't answer that! Today what you get is an example of integrating with JIRA's REST API, because their recent "upgrade" locked me out of the issue listings pages completely and I really do need to be able to see a list of bugs! Their bug editing screen is quite usable, so it's just the list that I need here, but you could easily call their other API methods as you need to.
-
SQL JOINing a Table to Itself
23 March 2012
Read moreGetting two sets of information from one table in a select statement often leads people to write subselects, but it really doesn't matter that this is the same table twice, we can just give it a new alias and treat it as if it were a different table. This is one of those techniques where, once you've seen it, it's really obvious, but until that point it can be very confusing. I explained this to someone else recently, so I thought I'd capture it here in case it's helpful to anyone else.
Consider that tried-and-tested example: employees and managers. Here's the staff table from the database (today's imaginary data isn't particularly imaginative, sorry):
-
5 Things To Do With A Training Budget of Zero
21 March 2012
Read moreTraining budgets are never generous enough to give us everything we think we need to keep our skill sets improving, however many people will be lucky enough to get something. If your training budget totals precisely zero pounds (or euros, or dollars, or whatever your local currency is), what do you do? Sulk until they give you something more? Or make the most of what you have?
-
Ideas of March: Write and Read
15 March 2012
Read moreToday you may see a few folk dusting off their blogs to celebrate "Ideas of March" where we blog about blogging and pledge our good intentions to blog for another year. Personally, I think I blog more than enough already, but I've been thinking recently about writing, ideas and how important two-way knowledge exchange is.
-
Speaking at Leeds PHP
13 March 2012
Read more
On Monday 19th March I'll be speaking at PHP Leeds. The topic is all things git and github; as an open source project lead I see lots of very capable programmers taking their first steps with github. In this session we'll talk about how you can use these tools to … -
Watch Over Long Running Processes with Supervisord
12 March 2012
Read moreAbout a year ago, I wrote a bit about gearman and how I was using it to create points in my application where intensive tasks could be processed asynchronously. It occurred to me recently as I was working on something quite similar that I didn't come back and write about the tool I use to manage the workers; supervisord.
-
Generating Callgraph with XHGUI
05 March 2012
Read moreI had a frustrating bug the other day with a new XHGUI install, I am working on creating a VM for my new PHP tools course I am teaching in March and I wanted to pre-install and part-install a bunch of things so that I can show some great tools in a limited amount of time. My XHGUI wasn't quite right though; it couldn't generate the callgraph for me. Instead, it said:
-
Using iterator_to_array() in PHP
29 February 2012
Read moreSomeone watching over my shoulder recently had never seen the ubiquitously-useful `iterator_to_array() <http://uk3.php.net/manual/en/function.iterator-to-array.php>`__ before. I'm sure they weren't alone and since I just typed it again, I thought I'd share a snippet.