16th December
2010
written by Ricky Stevens

This is something I do quite frequently, normally for AJAX actions that don’t require a template to be rendered on completion. It seems a little pointless creating a blank template just to honor Zend Frameworks proccess of every controller action linking to a template file. Its even worse adding in a die() or exit(), as this completely disrupts the flow of the code. The right way to do it is to simply disable these features, and stop Zend Framework trying to render the templates.

Continue reading “Zend Framework Disable Template Renders” »

7th December
2010
written by Ricky Stevens

Recently at work we came across an issue using Zend Frameworks Form builder – Zend Form. We were creating a form which contained a checkbox and this checkbox had to be checked for the form to be valid. In other words, if the checkbox wasn’t checked, the form should fail validation. Simple Eh?

Continue reading “Zend Framework – Checkbox Required Bug” »

26th November
2010
written by Ricky Stevens

After much deliberation, I settled on using Eclipse as my IDE for developing applications. This was for several reasons, which I won’t go into for now. However for an IDE as advanced as Eclipse, as well as the other popular IDE‘s, finding functionality can be a real problem within its Preferences system. One of the annoyances of Eclipse is its small Undo buffer. Recently I had enough of trying to undo changes and hitting the buffer, so I went looking for the solution.

Continue reading “Eclipse – Increase Undo Buffer” »

25th November
2010
written by Ricky Stevens

When using a SSL certificate for secure connections on websites, ensuring the correct pages render in the right protocol can be a little hit or miss. Take an eCommerce site for example, where the site and products itself should be going over the normal HTTP protocol. But when we get to the account login and payment mechanisms, we need to ensure HTTPS is used.

Continue reading “Force HTTPS With .htaccess” »

25th November
2010
written by Ricky Stevens

The Smarty template language, as you may know, can assign PHP variables to smarty tokens, which are used within the template. The problem arises when we need to use custom offsets for an array. While using a single variable for an offset is fine, trying to use another array offset as an offset for the first array can start to cause headaches.

Continue reading “Smarty – Custom Array Offsets” »

21st November
2010
written by Ricky Stevens

As of PHP 5.3.2 SHA512 has been supported natively with the PHP libraries. This really should end the days of using MD5() and SHA1() for password hashing, as while they were effective and secure in their day, they have become increasingly insecure. This was proved recently by German hacker Thomas Roth who used rented hardware to crack a SHA1 hash for $2. This obviously impacts highly on the way that passwords should be hashed in PHP applications.

Continue reading “PHP SHA512 Password Hashing” »

19th November
2010
written by Ricky Stevens

As you may notice the majority of my projects are created using Zend Framework using its Module-Controller-Action structure,  but in a previous existance I developed most of my applications in Symfony.  This was due to Symfony being the framework of choice at my place of employment at the time. Things have changed since then, and the framework of choice at my current employed is Zend Framework. I have however, hung on to a couple of concepts from my Symfony days, the primary one being multiple applications.

Continue reading “Zend Framework – Multiple Applications” »

19th November
2010
written by Ricky Stevens

Zend ACL is a great tool build into Zend Framework, where you can manage Roles and Resources to allow and disallow access to parts of the system. This can either be at module level, or all the way down to individual actions. Several large systems I’ve developed have relied on this access level control structure to manage user priverlages.

Continue reading “Zend Framework Generate ACL Resources” »

18th November
2010
written by Ricky Stevens

Recently at work we had a discussion regarding the process of searching for a specific row via a piece of data. When referencing a row in a highly populated database, speed and efficiency is paramount. This is always the first thought when creating a database schema, but another aspect which needs to be taken into account is security. While an Auto-incrementing Primary Key can be used, it may give away information which a potential attacker may be able to use.

Continue reading “MySQL: Hashing Vs Primary Keys” »

15th November
2010
written by Ricky Stevens

After looking through the HTML5 Boiler Plate techniques, one of many which stuck out to me were the use of multiple body tags.  This provided a nice alternative to Conditional Stylesheets and CSS hacks. The concept involves using conditional body tags, rather than loading in separate files. This way the only conditional code is used for 1 body element, keeping the un-used DOM elements to a minimum.

Continue reading “Alternative to CSS Conditional Stylesheets” »

Previous
Next