Thursday, November 19th, 2009

PHP and sessions: Very simple to use, but not as simple to understand as we might want to think. session.gc_maxlifetime This value (default 1440 seconds) defines how long an unused PHP session will be kept alive. For example: A user logs in, browses through your application or web site, for hours, for days. No problem. […]

Wednesday, November 18th, 2009

There are a lot of tutorial out there describing how to use PHP's classic MySQL extension to store and retrieve blobs. There are also many tutorials how to use PHP's MySQLi extension to use prepared statements to fight SQL injections in your web application. But there are no tutorials about using MySQLi with any blob […]

Friday, November 13th, 2009

Always messed around with a combo of opendir(), readdir(), and closedir() if you wanted to read the contents of a directory? Since PHP 5 there is a new sheriff in town: scandir(): <?php $files=scandir("/etc/php5"); print_r($files); ?> Outputs: Array ( [0] => . [1] => .. [2] => apache2 [3] => conf.d ) Okay, you still […]

Friday, November 13th, 2009

My colleague Brian Overstreet wrote a must-read paper about tuning different components of the Sun GlassFish Web Stack focusing on Apache, MySQL, and PHP: Performance Tuning the Sun GlassFish Web Stack.

Thursday, November 5th, 2009

If you're used to be a VMware user and try to switch to the Open-Source side of the Force by using VirtualBox, you may run into difficulties if you try to import an existing VDI file into VirtualBox. Actually it's quite easy, if you know how. The main difference between VMware and VirtualBox is that […]

Wednesday, November 4th, 2009

My last week blog topic was very much marked by Apache load balancing. Well, I promised to leave this topic alone for a while, but there is one related topic that is worth spending a minute on. The Theory If your web application is distributed across multiple servers you'll quickly run in sessions problems because […]

This blog copyright 2010-2012 by Kai 'Oswald' Seidler