Handling enumerated values

From time to time we come across the need to define class properties that take values from a limited set of values. A set of values that rarely (or never) changes and when it changes it changes only manually (by the developer) and not as a result of the running application. Usually, these values are…

PHP sessions under the microscope: Part 2

Security Considerations Sessions can be attacked. That’s a fact. And there are many ways to attack them. Three of the most common ways to do this are “session fixation” , “session hijacking” and “session flooding”. In simple words, session fixation is about tricking someone to use a session ID that does not belong to him/her….

Reasoning…Memcached

If you are a newcomer to the caching world, you may probable thing:  “Why should I use Memcached? MySQL cache is faster.” This is true. But real life problems are quite different than theory. So, before I answer, let me set the stage using a simple scenario. I have a demo database table named “snames”…

XDebug walkthrough

Xdebug is a PHP debugging extension that allows you to follow the code execution flow of your application (while running on a server) through your IDE. It allows you to control the execution (e.g line-by-line or function by function), pause the execution at any point and examine which variables are defined and the values they…

OAuth…in simple words

Let’s start by some OAuth definition from Wikipedia and try to break it down: “OAuth provides to clients a “secure delegated access” to server resources on behalf of a resource owner. It specifies a process for resource owners to authorize third-party access to their server resources without sharing their credentials” So, what do we have…