Memcached as a PHP Session Handler

By Josh Sherman
2 min read
development
php
memcached

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

By Josh Sherman
2 min read
development
php
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

By Josh Sherman
3 min read
development
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 […]

Apple iOS 7 Beta Review

By Josh Sherman
9 min read
reviews
apple
ios

Like many people, I went ahead and upgraded my phone to the Developer Preview of Apple’s latest iOS, version 7. Days later, I’m wondering if I will be downgrading next week because of a handful of issues that I would consider to be critical defects for my own usage. It’s […]

Configuring PHP Sessions

By Josh Sherman
2 min read
development
php

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 […]