Welcome to doginthehat — the website of Ben Lagoutte.

I’m the senior developer at Gozer Studio in Melbourne AU & the experimental father of a 2 years and 3 months old.

I sometimes take on side projects, send me contact request if you’d like to discuss one.

Recent Posts

Configure ArangoDB in strapi

I’ve just started testing out strapi and decided to run it against an existing ArangoDB database. I ran into a small issue with the automatically generated models. With the default generated code, you’ll notice that records do get added to the database but an E_UNKNOWN error keeps popping up in the admin and the records list has a blank id. ArangoDB uses a particular id key column called _key. To get this to work, you…

Read More

Testing your nginx configuration alteration in Gitlab Omnibus

If you’re familiar with nginx, you probably know to run nginx -t to test your config changes are valid before reloading the service. If you are running nginx through the embedded version of Gitlab Omnibus, it’s slightly more tricky. Say you’ve include some additional hosts to it (via nginx[‘custom_nginx_config’]) If you want to test that it’s correct before reloading everything the syntax is: /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx -t Path to nginx, with custom configuration path to…

Read More

Fixing Google Analytics integration in Lemonstand V1

With Lemonstand V1 now unfortunately unsupported, we’re starting to see a few random errors appearing now and then that won’t be fixed — e.g. braintree payments fix. Once such problem is the recent deprecation of Google’s auth login system and switch to oAuth2 which throws an error in the dashboard. Fear not, someone has already created a fix for it and published the code on Github: https://github.com/TuzBot/LS-V1-Google-Analytics-oAuth2 Effortlessly applied to a few sites. Thanks Michael…

Read More

Deprecated error with Lemonstand V1 and Braintree Payments

If you’re running an eCommerce website using Lemonstand V1 (which is now unsupported since their V2 is the new hot stuff) and have recently upgraded your server to PHP 5.5+, you may run into a deprecated error when using Braintree Payments. The error is in /modules/shop/payment_types/shop_braintree_transpredirect_payment/Braintree/Util.php and is pretty easy to fix. There are two functions using the deprecated /e modifier: delimiterToCamelCase & camelCaseToDelimiter. The fixed versions of these methods are: delimiterToCamelCase public static function…

Read More

Considerations with HSTS and storing website assets on Amazon S3

With SSL getting pretty cheap through some providers and many guides offering easy instructions to get going on setting up, be sure to approach with caution. Aral Balkan has a pretty well written set of instructions on this website on how to setup SSL with the best practice configuration. It’s all very good information available there. There is one line that you should be very cautious about understanding properly: # Add HSTS add_header Strict-Transport-Security “max-age=31536000;…

Read More


Interesting results trying to optimise a website for a client. This is the blitz.io results before and after. In both cases the website run the same Lemonstand installation. The before setup had a standard cPanel installation with: Apache 2.2.25 PHP 5.4.21 with XCache MySQL 5.0.96 2GB Ram The after setup has: nginx 1.0.15 PHP 5.5.15 with Zend OPcache (running as php-fpm) MySQL 5.5.39 6GB Ram There is obviously a lot of difference between the two…

Read More

Basic openssl RSA encrypt/decrypt example in Cocoa

Caveat – I’m building an OSX app for Maverick – this may work for iOS but I haven’t tried. In a recent project I’ve had to build a small Cocoa app that decrypt a packaged document. The document packaging is basically provided by a RSA public/private key encryption. The encryption is generated by a website and I had zero issue doing this in PHP.. actually was insanely simple. Then I had to do it in…

Read More

Compiling webpay on a cPanel based server

This is more of note-to-self for future reference but other people might appreciate it. If you have to use the St George webpay API, high five to you first and you’ve probably suffered through trying to install it. Assuming that you have all the requirements to compile it (swig, php), the only things you need to remember are: You need to compile it using the active php installation from cPanel/WHM, which includes the correct extension…

Read More

phpMyAdmin showing a 500 error after a WHM/cPanel upgrade

I did an upgrade to WHM/cPanel server today. Moved it to the latest cPanel software and did an easyApache upgrade to the latest php 5.3. All worked smoothly until I launch phpMyAdmin. No worky, dang. This one had me puzzle for a while. The crazy part is that I couldn’t find an error in the log. Turns out.. that when the upgrade happened, because it’s now php 5.3, the phpMyAdmin config file doesn’t set a…

Read More

Lemonstand Module – Dog Tools

Started a Lemonstand Module where I plan to add a few helpful developer items. Just one helper in there, the Dumb Gateway payment type: Dumb Gateway was never the smartest in class. Dumb Gateway goes nowhere and does as it feels. Add Dumb Gateway and set the mood. When Dumb Gateway is Happy, payment goes well. When Dumb Gateway is Sad, payment goes poorly. Sometimes Dumb Gateway is undecided. Dumb Gateway likes developers, but Dumb…

Read More

Recent Projects