Chapter31 - chapter31.com - chapter31 »
General Information:
Latest News:
Careful using PHP array_merge 22 Jun 2013 | 06:11 pm
Using array_merge bit me today when I merged an array (which happened to be empty) with a numerically indexed array. Because the array I was merging was empty, I expected my other (numerically indexe...
PHP ['SCRIPT_NAME'] returning empty string 21 Jun 2013 | 06:58 am
I was working with Slim (v2.2.x) the other day and saw that a PHP warning was being thrown in one of the interal Slim files: The code throwing the warning was the following if statement: The actual ...
Problem dumping MySQL database - Unknown system variable 'GTID_MODE' 19 Jun 2013 | 07:01 am
I was trying to dump and restore a MySQL database today, but received the following error when I tried to dump: The MySQL version of the database I was trying to dump was 5.5.28 and the server I was ...
INI Syntax Highlighting in Sublime Text 13 Jun 2013 | 11:37 am
I went searching for a package to provide syntax highlighting for INI files in Sublime Text. The reason? INI files are ugly ;( I found one that works well called sublime-text-2-ini. Installation isn...
Error writing git commit messages with vi 8 Jun 2013 | 06:24 pm
I typically write my git commit messages in the terminal, but today I wanted to write a multi-line comment so I left out the -m argument to git commit so it would open up my default editor, which is v...
PHP Composer error - cannot redeclare class 3 Jun 2013 | 04:16 am
I rebuilt PHP last night to include APC and all of a sudden composer stopped working in my project. Whenever I ran a simple update, install or dump-autoload I’d get: A quick google told me others als...
Installing APC in PHP 5.4.x on Mac OSX 2 Jun 2013 | 11:33 am
I recently installed PHP 5.4 from source but needed to add APC. Most people can install this using PECL, but I got an error doing this: So instead I downloaded the APC source from the PECL website a...
base16 - colour scheme for hackers 1 Jun 2013 | 12:40 pm
I came across a great set of colour schemes called base16. From the website: There are repos for the following tools: Base 16 Builder Vim Shell iTerm2 TextMate OSX Color Palette Xresources Mo...
Installing Xdebug on Mac Mountain Lion (10.8.3) 29 May 2013 | 01:31 am
Even though I’m running Mountain Lion (10.8.3) which comes with Xdebug I couldn’t get the PHP (5.4.14) local web server to register that Xdebug was actually installed and enabled. My php.ini had the ...
MySQL thread_stack overrun error 22 May 2013 | 11:28 am
We added a trigger to MySQL (v5.5.28) recently that was a simple UPDATE on table column, when a target table was UPDATEd. It ran fine (as expected) on our development environment but not when we pushe...