How to secure your PHP Web App with a simple Firewall

I was trying to find a simple way to secure my PHP Web App when I realized how difficult it could be. Securing it the easy way cost more money than I’m willing to spend, so I decided to build my own solution. What are your options? Compiling nginx with ModSecurity isn’t easy, and I don’t think your WAF (Web Application Firewall) should be tied into your web server. If you want to simplify things, you could use Cloudflare or Sucuri, but that can be expensive. [Read More]

Docker Explained for PHP Developers in 2018

This post assumes you have a basic understanding of Docker. But what is a basic knowledge? If you aren’t sure, I suggest you read the Get Started docs, and then you will have a basic understanding of Docker. I’ve read a few posts on Docker for PHP developers. However, it was the same tutorial on different sites, so I’m not going to copy what they did. I’ll explain the concepts that I struggled with learning. [Read More]

DigitalOcean Spaces – Learn how to use Spaces with PHP

Update on 10/25/2019: The Flysystem PHP is much easier. Using DigitalOcean Spaces with your next PHP project is a beautiful idea. Spaces will give you all the hard drive space that you could ever need. This post can help you build your next PHP project with DigitalOcean Spaces. Building out an infrastructure can be a difficult job for anyone, but DigitalOcean’s services make it a bit easier. Mounting Object Storage You could upload directly to S3 compatible storage using a PHP package, but it is easier to mount a bucket and let the file system handle the rest. [Read More]

Skeleton Repo for PHP, JavaScript, and SCSS

I work on a lot of different projects, and each one is unique in its own way. I often find myself installing packages manually and then configuring them. It seems like I repeat myself quite a bit, but the requirements of each project vary ever so slightly. In an attempt to prevent myself from repeating the same tasks over and over, I’ve started working on a skeleton repo that contains nearly everything I would need. [Read More]


This year I’ve continued to try different PHP frameworks. The ones I’ve tried are well written and have a fantastic community. I can see how some people may need to rely on a framework that does everything, but I like having control. And I prefer to add things instead of removing them. Silex has been enjoyable to use while building web applications. I have a skeleton repo that has everything I need. [Read More]

Short Post

It’s been a little while since I’ve posted anything, so here is a quick update. Website I finally pulled the trigger and implemented AMP. All the pages are now Accelerated Mobile Pages. I didn’t have to sacrifice anything, but I also didn’t spend very much time on the design or presentation. I’ll pretend that I was going for a “less is more” approach. Most visitors come from mobile, so they didn’t get to see any of the fancy stuff that was only for the desktops. [Read More]

PHP Adapter Design Pattern – Learn How It Can Help You

When I think of an adapter, I think of the three prong to two prong electrical outlet thing. It allows me to plug in an electrical device that has three prongs (one with a ground) into a two prong outlet that doesn’t have a ground. The interface of the outlet is two holes and the interface of the device it has three prongs, so we need an adapter to help us. [Read More]

Relationship Models for PHP and MySQL

Want to be in a relationship with a model? If that has always been a dream of yours, then I might be able to help. I firmly believe if you read this blog post, you’ll be able to attract any person you desire. Intelligence is an aphrodisiac. This post is really about how I developed my own model capable of handling relationships in a database. That said, it is probably going to get more technical and longer than my other posts. [Read More]

Interface or Abstract Class

I was recently working on a project, and I found myself adding the @property DocBlock to an interface. I knew it wasn’t good practice, but the class that is implementing that interface will provide those properties. I tried to convince myself it was okay. Interface Yes, it is a good idea to have your concrete classes implement an interface. It helps you plan how the class should work. Another benefit is using the interface as a type hint, you can then pass your concrete class as the parameter. [Read More]

Perceptual Hashing

Disclaimer: This is not a post about how you can get high and see things in a new light. Or is it? You may assume that computers know everything and they don’t need people to do anything. We have assistants on our phones that we can talk to and ask questions, so who cares about how things actually work. Well, I do care, and I think this is pretty nifty. [Read More]