ConFoo Vancouver & Montreal

We recently released the presentations for ConFoo Montreal. This giant conference will be held on March 8-10, 2017. It’s also the last chance to get tickets for ConFoo Vancouver, held on December 5-7, 2016. ConFoo is a multi-technology conference aimed specifically at web developers. It has between 100 and more than 150 presentations by local…

Read More

MySQL Duplicate Entry, But Not Really

I chased an interesting bug today. MySQL was complaining about “Integrity constraint violation: 1062 Duplicate entry”. I had all the necessary safeguards in my code to prevent duplicates in tha column. I gave up on logic and simply dumped the contents of the problematic column for every record. I found that there was a record with…

Read More

File Permissions for Web Servers

Many of you have asked me to write an article about Unix file permissions for web servers. This will serve to combat all those recommendations that are floating around, such as chmod -R 777, which I like to call the “hacker’s jackpot.” Basics of File Permissions The first concept to understand is the three roles. The user has the…

Read More

Fixing Doctrine Segfaults

I had a tricky segfault when trying to save a very simple Doctrine object. Here’s my debugging process and solution. Context I was using the sabre/vobject package to parse and save some iCal data. The parsed data was assigned to properties of a Doctrine entity and then persisted. The segmentation fault was happening every single time I called the…

Read More

Testing Methods That Make Static Calls

I had trouble testing a particularly painful codebase. It had static calls and implicit dependencies all over the place, to name just a few problems. One of the things that it often did was to call static methods that would increment counters in the database and cache stuff. Example: Record::incrementViews() It was making things difficult. To avoid messing with the…

Read More