Beginning Databases with PostgreSQL by Neil Matthew and Richard Stones
Sunday, July 17, 2011

A little while back I need to work with a custom framework that used PostgreSQL as its database. In particular, I needed to be able to set the site up on various machines both for testing and deployment purposes. As I had absolutely no experience of working with PostgreSQL, I went looking for a suitable book, and settled on this one. It proved to be an excellent choice. (more…)

Posted by James at 2:31 pm   0 comments

Storing Arrays in a Database Using JSON
Sunday, July 17, 2011

Sometimes you need to store arrays in your MySQL (or other relational) database, but don’t want to spread the information over multiple tables. For instance, I have been working on a CMS for a website, where you need to be able to add a variable selection of images, download links and products to the page configuration. Storing these sets of information in a single field was obviously a far cleaner solution. However, I needed a simple way to encode/decode the data. (more…)

Posted by James at 12:32 pm   0 comments

Using CKEditor with the Zend Framework
Friday, July 15, 2011

At the moment I am working on create a system that allows non-technical users to easily add and edit product pages on one of the website I have developed. Until now, adding or modifying a page has required modifications to the database and/or a PHP script file, along with uploading any new resources, such as images or documents. This has meant in practice that either I or one of the more technically minded people at the client has tended to do these changes. The idea of the new system is that it will allow anyone to add/edit product pages. (more…)

Posted by James at 5:39 pm   0 comments

Latest News
Wednesday, July 13, 2011

Due to some problems with my ISP, I temporarily lost the main GM-RAM website. As I was planning a revamp of the site, I decided not to restore the old version, but put up a simple front page with the basic company details. As a result, you can no longer see in action what has been described in some of the previous posts. I am hoping to put up a new site fairly soon, with content that reflects more accurately the company’s activities.

On another note, blogging has been light this year as I have been distracted by other, non-PHP based projects. However, I intend to put up a few new posts over the next week or so, given that my recent work has involved using PHP and related technologies again.

Posted by James at 6:55 pm   0 comments

Simple Access Control
Friday, January 28, 2011

In my previous post, I looked at using a controller plugin as part of a more complex access control system based on an access control list. However, sometimes a simpler solution makes sense. For instance, in a recent project, I just needed to restrict access to the admin section of the site. The admin section was contained within the admin module. I therefore need to check only two things:

  1. Was the user trying to access something in the admin section?
  2. Was the user logged in as admin?

I still needed to add the mechanism for logging in, but there was no need for an access control list, and the implementation of the Access Control Plugin was much simpler. (more…)

Posted by James at 7:26 pm   0 comments

The Access Control Plugin
Wednesday, December 8, 2010

This post deals with the last piece of the access control/authentication jigsaw: the Access Control plugin. It shows how an application can makes use of the Zend Framework’s controller plugin mechanism to apply the access control list to a user request. (more…)

Posted by James at 8:28 pm   2 comments

The Access Control List Class
Thursday, December 2, 2010

In a previous post, I discussed the creation of an Authentication class. In the following post, I discussed the creation of an Identity class. In this post I shall look at the creation of an Access Control List class. (more…)

Posted by James at 11:59 am   0 comments

The Identity Class
Thursday, November 25, 2010

In my previous post about creating an authentication class, I made use of another class, called Application_Model_Identity, to store the details of the user, who has logged in. In this post, I intended to look at some of the things that can be done with such a class, drawing on some of the applications that I have developed myself. (more…)

Posted by James at 7:30 pm   0 comments

The Authentication Class
Sunday, November 21, 2010

I prefer to encapsulate the code for logging in and out in a class. In the example I am using for this series of posts, the class is called Application_Model_Login. We have already seen in this post how it is used in the Login Controller. (more…)

Posted by James at 7:07 pm   4 comments

The Login Page: The Login Form
Monday, November 15, 2010

The Login Form is a simple form, consisting of three elements: the username field, the password field and the login button. (more…)

Posted by James at 11:51 pm   0 comments
Next Page »