Updating PHP 5 (or any other) Apps with Docker

PHP5, released in 2014, has reached its end of life in 2018, but many hosters continued to support it. If you have any custom PHP applications, you might still be running them on a server that has a PHP5 runtime.

The upgrade path for these applications might not be obvious, but I found a way that should make it easier, so in this article we’re going to have a look at running PHP simultaneously with PHP5 and PHP7 using docker and docker-compose.

Continue reading “Updating PHP 5 (or any other) Apps with Docker”

How to Create a Custom Landing Page in WordPress

If you’re using a WordPress theme you’re actually quite happy with, but you just want to change the appearance of individual pages completely, you can make use of two great things in WordPress. The possibility to create child themes and custom page templates.

For jonathanmh.com I wanted a great first page load time that enables users to quickly see what the page is about and not just show my latest blog posts. At the time of writing I’m using the twentyfifteen WordPress theme, but I wanted the front page to be separate from that entirely.

Continue reading “How to Create a Custom Landing Page in WordPress”

[Solved] Laravel: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.

Recently I set up a project with the laravel PHP framework and hit a little bump right away. After cloning my project on my computer at home, I encountered an error message about the AES key length.

Luckily I wasn’t the only one with that issue and running the following and conveniently available artisan commands fixed it already:

php artisan key:generate
php artisan config:clear

Continue reading “[Solved] Laravel: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.”

Searching the Google Books API with PHP [Quickstart]

APIs are always fun to me, because you gain access to a large pool of information. Today I want to take a quick look at how to access the Google Books API with PHP. The code snippets and general knowledge should be applicable to all kinds of other Google APIs like YouTube or Google+.


To access the Google API you will need an API key, which firstly requires you to register a project as a developer and then register your application as a client for the Google Books API. I have heavily screenshotted that process, because I didn’t find it very intuitive.

Secondly I’ll be using Composer for the ones that have php executable in their command line, most likely MacOS and Linux users. If you don’t want anything to do with composer, you can also download the Google API client manually from github.

Continue reading “Searching the Google Books API with PHP [Quickstart]”

NGINX / Apache: Block Requests to PHP file (xmlrpc.php)

This is going to be a short post about how to block your webserver from serving a specific file.

WordPress comes with a file called xmlrpc.php which enables you to use their mobile App on self-hosted blogs or enables ping- and trackbacks. However, there is a bunch of bots out there that attempt to brute-force their way in and can produce either high load or actually present a security risk.

Continue reading “NGINX / Apache: Block Requests to PHP file (xmlrpc.php)”

Best Free Source Code Editors for e.g.: HTML, CSS, JavaScript

This is a list of the best free source code editors, especially for web programming, for example for JavaScript, HTML or CSS, with some useful indications about features, difficulty and which platforms they are available for. If you’re looking to find the best fit for you, keep reading. This list is full of beginner friendly editors that also can be customized to fit your coding needs, no matter if it’s for HTML, CSS, JavaScript, Ruby, Python or PHP.

Continue reading “Best Free Source Code Editors for e.g.: HTML, CSS, JavaScript”

Phalcon, a high performance PHP MVC framework

Phalcon comes as a C binary, which you can set up as a PHP module in your php.ini. It makes the framework functionality available as PHP classes, so you won’t actually have to worry about the C part after the initial installation.


I’ve been writing PHP as one the first languages I learned, because I wanted to build web things, after learning the basics of programming in Python. Now, lately I’ve been writing a lot of JavaScript, both for Frontend and Backend, so obviously with node.js.

It’s great to see this approach coming to the PHP world and it seems like a possibility to make PHP one of the first choices for building APIs. The wide spread of the language could lead to adoption, if the some hosting companies jump this wagon.

The downside compared to other frameworks is of course, that you need to have control over your hosting environment to install the binary component.

The Volt Templating Engine

The Volt Templating Engine seems very familiar and includes functionality like blocks, variables in double curly brackets, conditionals and filters for string transformation.

{% if show_navigation %}
  <ul id="navigation">
  {% for item in menu %}
    <li><a href="{{ item.href }}">{{ item.caption }}</a></li>
  {% endfor %}
{% endif %}


Phalcon seems like a promising candidate for running PHP at scale. Although PHP is not my first choice any more, I do like to see it evolve and blossom in different frameworks and approaches.

(discovered via Thomas)

Buffer Jobs, hiring page done right!

I just stumbled upon buffer’s hiring page and I think it’s great. It shows what they’re doing, is visually beautiful and deserves a look! Buffer allows you to time your updates on social networks like twitter, facebook, linkedin and google plus. You can set which post you want to publish on which network and also when, so your posts don’t stop when you go offline or so you’re sure to hit your target group when they’re browsing a tag. Continue reading “Buffer Jobs, hiring page done right!”

PHP MVC: The Laravel Framework

The Laravel project has made a pretty smart move, that now is also in their quick start guide. They enable you to install it directly through composer! I’ve written about composer once when I ran into a little quirky bug on MacOS.

Using composer, which is a general dependency manager for PHP seems like a big step towards more interchangeable code between different PHP frameworks. I’ve briefly looked into Sparks some time ago, but it’s pretty specifically aimed at the CodeIgniter framework. Continue reading “PHP MVC: The Laravel Framework”