I remember when I first came across the mysterious double-colon (::), also known as the Scope Resolution Operator. I was experimenting with a php library I hadn’t written, but was asked to extend, and at the time I had no idea what classes were, how they worked, or how they helped. To try and figure…Read More The Scope Resolution Operator (::) explained
What is a Class A class is also known as an object. To better understand the concept of an object, think of it as you would a material object like a bear. Let’s pretend that we are going to have to make a bear using a class. To start you would give the animal a…Read More PHP Classes briefly explained
I like Dropbox. I use it all the time to share files across machines and work on group projects. However, I don’t like how Dropbox duplicates files as and saves them as conflicted copies. It’s not something that I need or use. I just delete those “conflicted” files. 99.99% of the time the conflicted files…Read More Remove dropbox conflicted files on Mac or Linux using Terminal
Today I had to set the PHP script execution time directly from within the php file. Here’s what I did. Add the following code to your file. You can change the seconds to what you need. It is important to be careful using this on a live server. If you allow a script to run…Read More Increase PHP Script Execution Time Limit Using ini_set()
My first post for this blog was about inspiration and why I believed it was necessary for success in business. The other day I was watching some videos of Steve Jobs on You Tube talking about business success. In the interview he stated that passion was the ingredient that sustained successful people until they had…Read More Life lesson #2: Passion is not a luxury.
Recently our servers went down. The error we were getting was “Too many connections”. This meant that we needed to increase the limit on the number of available connections within our mysql config file. The setting is called max_connections Before you go upping the number of max user connections there are two things to consider.…Read More What to do when you have the error “too many connections”
Recently we migrated our server to Media Temple’s grid servers. I had heard good things about Media Temple from others before making the decision to migrate, however while migrating we started to encounter challenges that I was not forewarned about. So here are 3 things that I wish we had known before moving, I hope…Read More 3 things I wish I had known before moving to Media Temple
Inevitably every programmer is going to encounter MVC architecture. MVC or model-view-controller is a pattern used by applications that divides the application into 3 parts. At first glance MVC can look more complicated than it is. Let’s look at the three parts. Model – The model handles the data and cares about where the data…Read More MVC architecture explained briefly.
Step 1. Sign up for Google Analytics Step 2. Add a New Account Once you are logged into Google Analytics: Click + New Account. On the Create New Accountpage, under General Information, enter your account name and the URL for your web property. You may see that the Account Name field has a default value of the URL for your…Read More Tutorial: How to add Google Analytics to WordPress
Here is a problem I face occasionally. When displaying a long line of code, like the full URL of a link, the text can be wider than the containing div and instead of wrapping the text goes beyond the edges of its containing div which looks ugly. Example: Solve this by simply adding the following…Read More Tutorial: Force text to line wrap using CSS