All entries of my technical and business blog.

Mod Rewrite to index.php file, the easy way

How many of you have written this before (or something very much like it): RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] (more…)

Add PHPUnit Listeners to Watch for Long Running Tests

One of the under-utilized features of PHPUnit probably is the listeners interface. You can see the configuration options here: php.net/appendixes.configuration.html. So, I decided that I want to use this to know if a Unit Test takes longer than 2 seconds to run. That’s super over-kill in my opinion, but that’s my hard limit. If it takes longer than 2 seconds to run, something is wrong! So, I added the following to my configuration: (more…)

Setting PHP Command Line Colors

I’m not entirely certain why this escaped me for so long, but it’s remarkably easy to set terminal colors with PHP. Simply echo the escape/color character \033, followed by the bash color definition and your output. For reference, here is a listing of bash colors. So, for example, if we want to make something blue text, do the following: (more…)

php

When you Create Your Account, Please log in.

I’ve always found it annoying when programmers create systems where you create your account and then you’re not logged in. Maybe I’m lazy? I decided to do a poll on a popular social networking site. The poll went like this: (more…)

Zend Framework Authentication: Let the user know if it is their fault

One of the things that is irritating is logging into a website with credentials that you know are right, only to have it fail. Then, later, you find that the site was malfunctioning. By then, maybe you requested a new password, or had to at least waste time looking up your old password. With Zend_Auth, however, we can prevent user’s from having that issue. (more…)

Presenting at Joomla Day Midwest

Hello all. It’s been quite the long time since I updated my blog. I know, I know, this is a huge problem, considering this is a cardinal sin according to my talk at MKEPUG about getting job offers. That was wrong, I know. However, things have been pretty busy. Let’s see… (more…)

Service Class Methodology

There has been a lot of discussion on forums and throughout the object oriented PHP programming community about service classes. This is just intensified by the Zend Framework model of development coupled with the changes in their design/architecture and vocal spokespeople. I thought I’d throw my hat in the ring for this. (more…)

Zend Framework Front Controllers vs Bootstrap: Round 2

There was some discussion on Twitter regarding the original version of my article about putting most of your site’s setup in the front controller plugins in Zend Framework. However, I haven’t seen a lot of real reasons except for “that’s what the example says” or “this is how I feel.” These suggestions I have are based on performance and logical reasons. However, I could be wrong or maybe I was unclear. So I did a... (more…)

Testing Outgoing Email with Zend Framework

I was creating a new application with Zend Framework at work the other day and I started using my technique that I described here by adding the original email in my email address using the + sign. However, the current organization I’m at has a mailserver (Exchange?) that is either configured not to allow this or just doesn’t have this functionality built in. So, this won’t work. I solved this with a new implementation of... (more…)

⬅ Newer | Older ➡
Page 23 of 50

Get the RSS or use IFTTT for RSS to Email