Page 10 of Software Development Articles

Redis as a PHP Session Handler

Redis is one of my favorite key-value stores, the range of data types alone make it a must have in any developer”s tool belt. Another great use for Redis is as your session handler in PHP. The optional persistence that Redis provides makes it a better option than using Memcached […]

Memcached as a PHP Session Handler

Memcached makes a semi-perfect solution for storing your PHP sessions. Why only semi-perfect? Well in Memcached’s defense, the fact that it is an in-memory data store makes it a great choice because of the speed. The negative is the lack of persistence, which makes it somewhat less desirable. What this […]

Installing PHP Redis - A PHP Extension for Redis

Redis is one of my favorite new data stores of the NoSQL movement. It has the power and speed to act as a caching server like Memcached and it has more advanced data types to make it more like an RDBMS. Before we can talk about using Redis as a […]

Calculate Age from Date with PHP

Calculating the age based on a date is a pretty simple task that can be accomplished many different ways (Google yield’s quite a few different approaches). The caveat that usually arises is that you need to factor in which side of the birthday you are on based on the day’s […]

Configuring PHP Sessions

Now that we know how to use sessions and have built a simple login system, let’s take a look at some options for configuring PHP sessions. Out of the box, PHP is configured to file-based sessions with a max lifetime of 1440 seconds (a mere 24 minutes). Garbage collection probability […]

PHP Login System

Following up on yesterday’s introduction to PHP Sessions, let’s talk about building a simple login system in PHP. To start, you will need to make sure that pages on your site that are behind the login page will have sessions enabled. This can be done for all of your pages […]

PHP Session Handling

Sessions, one of those necessary evils when building websites. They come into play whenever you need to have data available between pages on a site. These scenarios typically arise when you have login restricted areas on a site. Why do I refer to them as evil? Quite a few reasons […]

Sending Email from PHP

I remember one of my first paid programming gigs, it was to build a contact form for a friend’s website. Not one of those janky mailto: hacks that attempted to open the local email client. I’m talking about a form that would send mail from the server, you know, in […]

Password Hashing Techniques in PHP

This post started as part of yesterday’s post on encrypting passwords as a subsection labeled “Salt? Pepper? When did this become a cooking blog?” The fact is, I felt that the section was a bit long-winded and warranted a dedicated post. Without further ado let’s talk about some techniques for […]

Encrypting Passwords in PHP

Not all hashing functions are created equally, some are considered more secure than others and yet all of them are more secure than storing plaintext passwords. In this post I’m going to discuss some of the common PHP hashing functions that can be used as an alternative to storing plaintext […]

Specifying a User Agent when using file_get_contents() in PHP

I recently encountered a scenario where one of my site’s login system stopped working. The piece of code that stopped working was the third-party login that leveraged GitHub for the authentication. It was one of those “it worked yesterday” moments for sure. After some research, I discovered that GitHub had […]

LESS Icons for easy styling and customization

Got a new project I wanted to share with everyone, it’s called icons.less (or LESS Icons) and it’s available for immediate forking and use over at GitHub. The project itself stemmed from my own desire to have a set of social icons that were easy to customize for different websites […]

Browser redirect with PHP

Within nearly every web site or application there is a need to redirect a user to another page. Perhaps you want to route them to a login page when they aren’t authenticated or maybe because a page moved and you want to take them to the new location. To accomplish […]

Advice on Freelancing

A friend of mine recently asked me for some advice in regard to a freelancing project he was in the quoting phase of. I figured, what a great topic for a blog post! Keep in mind though, I haven’t freelanced in years, mainly because I am not a fan of […]

How I use Redis

If you know me you know that I’m a huge proponent of Redis. I started using it in mid-2011 as the storage engine for a chat system I was building for SceneKids. Over the last year and a half or so I’ve utilized Redis more and more for many other […]

PHP: Built for the web

If you know me, you know I’m a pretty devout PHP coder when it comes to my own adventures in web development. I’ve been using it since version 3 (started with it in Y2K) and in using it that long, I’d be the last person to say that it’s a […]

Blocking Proxy Sites with JavaScript

Social websites don’t always attract the most desireable patrons and often times those users opt to hide their identity (as well as blocking banner ads) behind a proxy server. There are quite a few free web-based proxies out there (generally ad funded, some have premium tiers) and they typically have […]

Going Vanilla with MySQL

Over the last few years I’ve gotten down and dirty with MySQL’s config file, my.cnf. I read and re-read the MySQL documentation as well as any blog posts I could find on the subject. I was able to keep my connections low with caching and fought against the InnoDB buffer […]

Node.js for Web Apps? Not so much.

I’m sure I’ll catch some flak for this from the Node.js community (which does seem to be thriving) but I’m just not seeing Node.js as a viable platform for building web applications. When I say web application, I specifically mean websites. The platform seems great for building small servers and […]

Lessons learned about directory based sharding

“Too many files?” is what I said in disbelief when I was having issues restoring a Linode backup a while back. I was sitting on over 10 million files after I had moved a metric shit ton of data from MySQL to disk and restructured the data structure for the […]

Review: Anatomy Framework

From the developer, Nick Justice: Anatomy is a light-weight and responsive front end framework that invokes rapid development. I don’t usually review anything on here, let alone a framework, but it’s also not often that I get to use something new that’s built in my backyard of Tampa, FL. As […]

Command line website uptime checker using the OS X Notification Center

Honestly, the title of this post covers all the bases of my pre-Turkey consumption proof of concept turned full on project. Just a simple Ruby script that parses a configuration file and checks to see if the site is up (returning 2xx or 3xx code). If the site appears down […]

DKIM with multiple domains with Exim4

Maybe my Google-fu was off when I was originally trying to figure this one out, but when searching for setting up DKIM for multiple domains on the same server all I came up with were complex ways to serve up domain-specific DKIM signatures. This seemed like overkill, especially going as […]

Go fork yourself you forking fork

So even with the recent ship jumping over to a plethora of Apple products, I still find myself to be an open source supporter, contributor and maybe even a part-time aficionado. But as of late, I gotta say, I’m starting to hate the ecosystem a bit, from at least two […]

Drain your InnoDB Buffer Pool by moving large fields out of MySQL

This was supposed to be a “SceneKids.com the first year” post, but nothing has really changed too much since the 8 month post with the exception of expanding out with additional websites on the same platform. Instead, I’m going to discuss a dilemma I ran into with MySQL’s InnoDB data […]