Debugging PHP Files From The Command Line

Here’s a handy tip for debugging PHP files when all you get is a blank white screen. You know something is wrong, but it isn’t telling you what. This is a common problem when editing custom template files for WordPress.

Error output can be configured by modifying the php.ini file, but this may not always be accessible. Another way to have PHP tell you where it’s having a problem is by going to the command line and running it there:

    $ php -l report.php 
    Parse error: parse error in report.php on line 834
    Errors parsing report.php

There it is: “line 834″. It’s a quick and simple solution, and should work for just about any PHP file.

Dealing With A Hacked WordPress Site

If your WordPress site gets hacked, it’s usually pretty obvious. More than likely, your website shows nothing but a message from the hacker, often accompanied by some loud music.


Luckily, in most cases, the damage done to the site is merely visual, and finding and replacing a couple of key files is enough to get the site back up and running. However, you should also take steps to find out where your site was vulnerable and resolve those issues to prevent it from happening again.

WordPress has an FAQ especially for all of this. Read it first and determine whether or not this is something you can deal with yourself. If not, give me a call. I’ve dealt with a number of these and can get your site back online quickly.

iPhone 5: Workaround to Faulty Buttons

According to this engadget article, Apple has started a new program to repair, for free, iPhone 5′s with faulty sleep buttons. I’m currently using an iPhone 5, and it isn’t my original one. That one had a faulty button, which Apple simply swapped for a new one when I brought it in, but that might not be feasible for the long term.

If your iPhone has this problem, and you need to get by for a couple of days before getting it to Apple, here is a temporary fix that will keep you going. This will also work for you if your Home button isn’t working right.

The solution is a feature called AssistiveTouch. Open the Settings app, go to General, then Accessibility, where you will find an entry called AssistiveTouch. If you haven’t delved this deep into your device’s settings before: Welcome. Open it, and activate the option:


Immediately, you’ll see a glowing button appear on the screen, which you can position anywhere on the outside edge of the screen by dragging it around. Say hello to your second Home button. Go ahead, spend a minute zipping it around the screen just for fun.

When you tap it, you’re presented with a number of options:


Tap Device, and select Lock Screen. Not the most elegant solution, but at least you’ll be able to lock your device. You’ll notice the various Home button related tasks you can perform there as well, plus a whole bunch of other actions like changing the volume, getting to the multitasking screen, or taking a screen shot.

Good luck with your device!

Starbucks Launches New App, Not Update

Starbucks updated their app recently, but instead of going through the normal process of updating their existing app, they launched a completely new one.


Old icon, new icon

I’m sure there was a specific technical reason for doing this, but it means that unless you open the old app and see the update notice, you won’t automatically get the new version. Head over the App Store, search “Starbucks”, and download the new app. It’s much more streamlined and is free of some of the visual bugs that made the old one look bad.

Tremor Tracker 2.4

My latest update for the Tremor Tracker app was just released to the App Store.

Tremor Tracker 2.4

This version adds a couple of new features, addresses some bugs, and implements a few visual changes to match the iOS 7 display. Also, as you can see, it comes with a new icon for a more distinctive look.

Click the image above to view the app on iTunes and download it to your iPhone, iPad, or iPod Touch!

Connecting a MacBook to a TV with RCA connectors

I recently needed to connect a MacBook to a TV set. For most people, this is as simple as getting an adapter, plugging in their HDMI cable, and moving on. However, the TV in question is an old model, with nothing but RCA inputs.

A Google search quickly locates pages of questions regarding this same problem, with many answers and a varying level of successful solutions. I spent a good deal of time figuring out what was necessary, some time on Amazon to find products to match, and came up with something I thought would work. Maybe I got lucky, but my solution was a success, and I’m sharing it here to help anyone else in a similar situation.


To make this work, you’ll need three things:

Apple Mini DisplayPort to VGA Adapter

Click here to see the product.

This is your standard Apple adapter. If you have an older MacBook, you’ll need a Mini DVI adapter instead of the Mini DisplayPort. Find out which one your device supports and purchase accordingly.

Generic PC to TV Converter

Click here to see the product.

This is where the magic happens. Somewhere, somehow, inside this blue box, the signal from the VGA cable is converted and exported to a video RCA plug.

Stereo to RCA Cord

Click here to see the product.

The audio needs to be sent separately from your MacBook to the TV, and this will let you go directly from one to the other. You do not need this exact product, and it’s possible you can find it at a local electronics store, or even a dollar store.

Bringing it all together

Once you have all of your equipment, the rest of the process is basically just plugging in cords. Let’s take a look at the cords you’ll plug into your MacBook:

On the left, you see the Apple Mini DisplayPort to VGA Adapter, which is plugged into the VGA cable that comes along with the Generic PC to TV Converter. Next to it is a USB cable that powers the Generic PC to TV Converter, and comes with it. And on the right, the stereo end of the Stereo to RCA cord.

Now we look at the Converter box:

On the left is the power input, which connects to your MacBook via USB. In the middle is the yellow RCA cable which is the output we’re looking for. On the right is the VGA cable, which is plugged into the Apple Mini DisplayPort to VGA Adapter on the other end.

Once everything you see here is connected, plug the yellow video cable, and the red and white audio cables into the corresponding places on the TV set. If you’re lucky, it’ll just work. If it doesn’t work right the first time, don’t panic. There are a lot of cords and connections, and you’ll need to tinker a bit. I’ll provide a couple of tips below.


If you have trouble making this work, try the following:


You may see a rapidly flickering screen. If this happens, look on one of the sides of the blue Generic PC to TV Converter box where you’ll find two tiny switches. Confer with the manual, but in the end I had to guess. Try flipping them both in the opposite direction.

Check the connections and TV settings

You’re dealing with at least 10 connection points. Make sure they’re all plugged in properly. Some TVs have more than one set of RCA connectors. Be sure your TV is displaying the right ones.

MacBook display settings

When you plug in the Apple Mini DisplayPort to VGA Adapter, you should see a display screen icon in the top bar. Check the settings to make sure everything looks good on that end.

A Project Is More Than Just Code

Developing a piece of software is basically taking requirements A, B, and C, and generating the code that makes them happen. But when I deal with a project, I try to see beyond the code. What is the client trying to accomplish? How can I use my past experience to advise and guide the client? What is the best method of communicating the status of the project and any issues that need to be dealt with?

Thank You

As a result, clients are happier, are more willing to work with you again in the future, and are much more likely to refer others to you. It’s called “providing a service” for a reason. Start thinking along those lines for your software projects, and start seeing the positive effects!


  1. Can you provide the client with something that will actually benefit them? If not, refer them to someone who can. Your reputation will mean more in the long term.
  2. Don’t be afraid to send a list of suggestions to a client. You’ll be adding value to your services, and you can generate additional business for yourself or others you can refer them to.
  3. Be a source of information. When you come across an article that could help a client, send them a quick email with the link. It’s a good way to keep in touch.
  4. Figure out the best method of communicating with your clients, whether it’s email, phone, or their project management software. Keeping the communication side of the project in their comfort zone will make the experience a lot better.

Top 3 Reasons To Get The iPhone 5S or 5C

It’s a first for Apple: They have announced the release of two versions of a particular device, moving away from the only-the-best strategy they’ve gone with for so many years. And so we have the iPhone 5S, and the iPhone 5C. The 5S is the top-of-the-line offering, with too many upgrades, advancements, and new features to list here. The 5C is, broadly speaking, just a new iPhone 5 with a few improvements and a rainbow of color options.

The question some people are going face is which of the two to buy. Existing iPhone users now need to decide whether to keep up with the cutting edge. New iPhone users will need to determine which device they should start out with. To help, I’ve come up with my Top 3 reasons for getting either of the devices:

Top 3 reasons to get the iPhone 5S

1. You want to have the latest and greatest.

Whether you’ve had an iPhone for years, or will get one for the first time, this is something important to many users. Why get second best when first best is within reach? This is certainly going to be the phone of choice for heavy users that want to explore and make use of every aspect of the device. You can bet that apps are going to start making use of the specialized features and if you want to take advantage of them now, this device is a must.

My top 3 reasons here are going to seem a bit simplistic because of the sheer number of individual features the iPhone 5S has, but from a high level I can’t pick some of them because most users won’t even know they exist. If you want to see all of the features in the announcement, see it here on the TechCrunch live blog.

2. Enhanced camera features.

If your main camera is your phone, this will be a big deciding factor. The iPhone 5S has some big improvements in the camera technology, as well as additional special features like slow motion, burst photo mode, and more.

3. Touch ID: Fingerprint scanner.

This much anticipated and discussed feature really adds a high-tech and very cool element. Log in with the touch of your finger. Purchase an app just by touching the home button. Wow. Is it a make or break feature? Probably not, but a lot of people put passcodes on their devices and this is going to be huge for them. It also means that your friends, co-workers, and children won’t be able to access your device because it’s not just a password for entry — it’s your fingerprint!

Top 3 reasons to get the iPhone 5C

1. Inexpensive entry into iPhones.

The price of the iPhone 5C will likely be the biggest reason most people buy it. It makes the iPhone available to people who couldn’t previously afford it, and takes away some of the risk for new users. $99 with a two-year contract is an amazing deal, one that has previously only been available for older models. And you still get a great phone!

2. Don’t need all the features.

Having an iPhone can be much more than all of the great features and apps. There is an element of compatibility that goes along with the choice of a phone. Most importantly in my mind is the interaction between you and the people you contact the most. Do your friends, parents, children, or business partners use the iPhone? By getting an iPhone yourself, you open the door to many great communication methods. iMessage lets you send text messages free between iOS devices. FaceTime allows for free video conferencing, right from your device to other iOS devices and Mac computers. All this can be at your fingertips without getting the top model.

3. It’s far better than getting a previous model.

Let’s all try hard not to be tempted by older iPhone models that will likely be discounted even further. Don’t get into the market two or three steps behind. If you really can’t get the iPhone 5S or 5C, at least choose the iPhone 5. If you buy anything earlier than that, you will very soon regret the features you don’t have access to, and eventually the apps you won’t be able to install because you can’t support them.

Discuss this post and other related topics on my Facebook page.