PHP: A new kind of template engine

February 21, 2010

I have been developing a custom Content Management System (CMS) for Blam Designs and though there are several really good templating engines out there for PHP (such as Smarty) I find them usually bulky. Then there is also the need to learn the templating language as well. Though the templating languages are simple, it is

PHP: Fatal error: Trying to clone an uncloneable object of class mysqli

July 18, 2009

I was working on a report for a client when I discovered this rather odd error: Fatal error: Trying to clone an uncloneable object of class mysqli. I am still not sure what caused this error, but there does seem to be a quick fix for it. ini_set(‘zend.ze1_compatibility_mode’, 0); Here is what the PHP manual

PHP: __call Magic

July 10, 2009

Lastnight as I was researching how to build a plugin system for a cms I am working on I ran across several implementations using the __call method. I had not used it before myself, but after doing a little googling I devised a test. It really is quite simple and can be a powerhouse in

PHP: Email Validation

May 15, 2009

There are an overwhelming number of regex sequences out there to validate an email address against, and frankly I get tired of running through them all trying to find one that fits my situation. I went looking for one that most closely follows the IETF rules and lo and behold I find a document describing

PHP: Random Password Generator

May 15, 2009

I find myself wanting random passwords all the time, and on a web project I needed to generate passwords automatically to send out to users. Here is the function I use to create random passwords automatically. /** * Creates a random password * * @param Integer $length – Default: 9 * @param Integer $strength –