Need A Developer?
I am now able to accept a limited number of new clients.

Please contact me for details

Services

To inquire about hiring me to handle your web development needs, please use the form on the contact me page.

I am able to handle web development projects of any difficulty level, from simple routine work to complex projects.

After trying out MyIntervals for a while, I think I am going back to Basecamp for my project management solution.

Why?

I really liked the time tracking/time management that MyIntervals offered, but there are several areas where I feel it didn’t meet my needs as well as Basecamp did.

While MyIntervals might be a terrific solution for some web developers, it has some features I didn’t need that only added to the complexity, and it was a lot weaker in terms of communication between me and my clients, an area that Basecamp is particularly strong in.

I’m going to really miss some of the time management functionality that MyIntervals provided, but there are a few add-ons to Basecamp that I believe will help close the gap in that area between the two solutions. In particular, Project Recon is one that I will definitely be trying out. I might also try some of the other solutions listed here in the near future, as they have several interesting ones listed there.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

About a week ago, I got an email stating that Sphinx version 0.9.8 had been released.

I first used Sphinx well over a year ago, when I had a project that required full-text searching of a massive, 25 Million + database, something that was probably a little too big for the default MySQL full-text engine to handle. Additionally, I wanted to use the InnoDB MySQL engine, as opposed to the ISAM (which is the one that had full-text capabilities).

After doing some research, I ended up going with a MySQL/Sphinx joint solution, where I stored the data in MySQL, and used Sphinx to actually do the searching.

Since then, this already impressive project has come a long way, and if you haven’t already checked it out, it is well worth a look. It seems to be gaining quite a bit of traction. From the latest email:

Also in the news, we’re among the finalists in SourceForge Community Choice Awards 2008! Sphinx is in the shortlists for “Best Project”, “Best Project for the Enterprise”, and, somewhat unexpectedly for me, “Most Likely to Be the Next $1B Acquisition”. Many thanks to all who voted for Sphinx during the nominations! Now is the time to vote again in the 2nd round. There are several quite popular competitors (such as OpenOffice), so please spread the word as much as you can.

Here’s the link again…

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

Project management software! If you aren’t using it now, you’re likely not being as productive as you otherwise might be.

I have, in the past, used Basecamp to manage my projects (in conjunction with Blinksale). Recently, however, I have been wanting something a little different, so after eying it for a few weeks, I finally set up a trial account with MyIntervals this morning (both software packages offer a free trial).

Pros? Cons?

Well, they each have their strengths, I suppose.

Basecamp is stronger on the communication side of things (with “Writeboards”, Messages, and even chat software integrated). They also pride themselves on the simplicity of their software, and in my experience, clients rarely have any trouble learning how it works. It doesn’t have any invoicing functionality, but I have made up for that deficiency by integrating it with Blinksale.

MyIntervals, on the other hand, is stronger on time management. It has detailed time tracking and reporting interfaces, as well as invoicing functionality, and has a good many more features then Basecamp has.

It’s just been one day, but so far, I am really liking MyIntervals, and their emphasis on time management/tracking, so I will most likely be staying with them.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

As a PHP developer, I work quite a bit with MySQL database tables, both in the course of developing new websites / web applications, as well as modifying or adding features to existing websites.

One thing that always surprises me when working on code written by others is how frequently the code is subject to what is called MySQL Injection Attacks.

MySQL Injection Attacks are basically where, due to poorly written code, hackers can execute custom MySQL commands (that the developer did not wish the script to be able to execute). These hacks can range from deleting all data in a database table, to logging in as a user, to even stealing data from databases in certain cases.

Well-written MySQL queries can easily prevent such attacks. However, many developers, either out of ignorance or, well, laziness, just don’t properly write their queries.

Let’s back up a few steps here. Some servers, especially in past years, have had a PHP option called Magic Quotes (deprecated as of PHP 5.3.0) enabled. This option automatically “escapes” special characters in data that users submit, say, through a web form.

This escaping is necessary on all user-submitted data that is used in a MySQL query. However, setting the server to automatically escape all user-submitted data is problematic for several reason.

A much better way of doing it is to escape each piece of user-submitted data right when it is inserted into the query. Most MVC frameworks which contain some database model have their own custom-named function that can do this for you.

For those of you who are writing in raw PHP code, PHP has a built-in mysql_real_escape_string function, which you can use to obtain the same results (many custom database libraries use that function).

Anyway, there is no excuse for programmers to not take this small, basic step in securing their web applications, so make sure you take advantage of the tools at your disposal here.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

Although this is not necessarily related to PHP development, the subject of time management and productivity is one that affects everyone. In my experience, those of us who work fulltime online (doing site development, internet marketing, or related work) often make poor use of our time.

The nature of the work is that it often exposes us to many distractions, ranging from email (always log out of email when you’re working!) to chat (same here…) to an interesting link you happen to stumble upon.

Although I have read many productivity and time management books through the years, many of which were helpful, there are a few things that are unique to fulltime web professionals, a group that none of the books I read specifically targeted.

However, late yesterday afternoon, I got an email with a link to a half-hour video put out by Eben at Guru MasterMind titled “Becoming a Productive Modern Guru”, which had some very helpful advice.

If you have read or studied the subject in the past, you will likely hear some familiar techniques, but if you take the time to watch it, you will hopefully pick up some new “tools” to improve your productivity.

Edit: The video has been removed, so it has been de-linked. Sorry! Similar videos from Eben can be found at this YouTube channel.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

CodeIgniter PHP Framework

As I work on programming projects, I am constantly looking for ways to boost productivity, decrease the development time, and, most importantly, to increase the quality of the code I produce.

To those ends, I came across the family of MVC (model-view-control, a class design pattern) frameworks for PHP early in my “productivity quest”, and have never looked back.

Although there are several other frameworks, such as the Zend Framework, and CakePHP, my current favorite framework would have to be the CodeIgniter framework.

This framework, like the others mentioned above, uses the MVC design pattern, similar to the popular Rubies on Rails (ROR programmers shouldn’t have much trouble jumping over to a MVC PHP framework, as the syntax is in many ways, very similar).

I now start most new projects with a copy of CodeIgniter using the Smarty library for templating (I prefer that to the default CodeIgniter templating system), and have noticed an increase in development speed of new projects since using it.

It is possible to simply plug in different libraries (in addition to the libraries that come with CodeIgniter), and I have done that with graphing libraries, image libraries, and a host of other third-party solutions in my applications, to significantly speed up the development of new sites.

For those of you who are currently using another framework or are not even using a framework, CodeIgniter is definitely worth a look, to see if it fits with your programming style. It’s not the only solution out there, but it has done well for my projects.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

Redirects with PHP

Today, I thought I would knock out a relatively light subject before tackling heavier stuff in the upcoming weeks and months. That topic is implementing header redirects with PHP.

Header redirects are redirects that are handled instantaneously and transparently by the browser, and come in two common forms: 301 redirects and 302 redirects.

The difference between the two is that a 301 redirect is used to tell users that a particular page has permanently moved, and a 302 redirect is used to tell users that a page has only been moved temporarily.

To implement a redirect, the following code must be placed in your PHP script before it prints out any output. Because the redirect is sent in the HTTP header, if the PHP script outputs anything before the redirect header is set, PHP will automatically send headers along with the data that is printed out, and it is impossible to add other headers after data is printed.

301 Redirect:

302 Redirect:

One important thing to keep in mind when considering putting up a redirect, is that search engines will generally follow and pass link popularity on through 301 redirects, but not 302 redirects, so if the redirect is more or less permanent and you would like the search engine indexing/ranking to reflect that, then a 301 is the way to go.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!

Page Compression with PHP

A question that is often asked by new PHP programmers is:

“How do we compress the (HTML) page output?”

First of all, why would anyone want to compress their webpages? There are really two reasons why it is useful:

  1. The page loads faster, especially for users with slower internet connections
  2. The site uses less bandwidth, which means that the site, especially if it gets lots of traffic, is cheaper to run

The downside to compressing page output is that it uses more CPU processing power, but the benefits usually outweigh the extra processing that needs to take place server-side.

Techniques for Compressing Page Output

There are several ways to compress page output, which we will discuss below:

First of all, it is possible to activate it for all content (both PHP and non-PHP) served by your Apache web server by changing the configuration of Apache. However, for this post, we will focus on doing it with PHP, as that is the subject of this blog.

If you have access to your php.ini configuration file, the preferred method of compressing all PHP output is to do it by modifying the following configuration settings in that file to have these values:

In the above code, “zlib.output_compression_level” should be set to a value between 1 and 9, with the higher values giving more compression, but using more server (CPU) resources.

Alternatively, if you don’t have access to the php.ini file on your server, you can put the compression code directly in your PHP scripts. To do that, put the following line at the top of all of your PHP pages that you want compressed:

Either way you use, once you think you have everything in place, you can use one of many compression testing websites in order to verify that your site is indeed sending compressed output to browsers.

Is it worth it to set up page compression? In most cases, yes.

For example, on one site I was recently working on, we were serving up about 2 Million pages/month without compression. We had complaints of the site loading slowly for some users (the pages were large), as well as the bandwidth getting expensive, so I took steps to set up page compression using the (first) php.ini method.

After getting it configured, I saw a noticeable decrease in page loading time, even for me with my fast internet connection, and the bandwidth bill dropped to only around 30% of what it was before. At the same time, the load on the dual Xeon processor didn’t move up noticeably, so in this case, I considered it to be a success.

Nathan Malone

P.S. I am currently able to accept a limited number of additional clients for my PHP Development services. Interested in discussing the possibility of my handling your project for you? Contact me!