Last month we looked at basic user authentication with PHP. The methods shown were useful for simple applications that require only minimal security. More complex applications, however, tend to require a more flexible and robust authentication system as well as session handling, permissions, and so on. Building such a system on your own would probably require a lot of time, during which you’d be reinventing wheels (and bugs). This month we’ll look at PHPLib and some of the features you could take advantage of.
Last month we looked at basic user authentication with PHP. The methods shown were useful for simple applications that require only minimal security. More complex applications, however, tend to require a more flexible and robust authentication system as well as session handling, permissions, and so on. Building such a system on your own would probably require a lot of time, during which you’d be reinventing wheels (and bugs). This month we’ll look at PHPLib and some of the features you could take advantage of.
What’s PHPLib?
PHPLib (http://phplib.sourceforge.net) is a library of classes for PHP that you can use in building medium and large-scale Web applications. “Classes?” you may be wondering. Yes, PHP provides support for classes and other object- oriented programming constructs. This means you can build generic software components that you’ll use across a large variety of applications. This often comes as news to folks who’ve been using PHP from the early days and upgraded without really taking note of its new features.
PHPLib provides the classes for the following:
database access (MySQL, PostgreSQL, Oracle, etc.)
authentication
session management
permission checks
user accounts
shopping carts
templates
database queries
As you can see, PHPLib is feature-packed. While it may sound like the “kitchen sink” of PHP bloat-ware libraries, PHPLib is designed such that you can pick and choose the components you want to use in your applications.
Installation
Because PHPLib is a rather complex library, there are a variety of…
Please log in to view this content.
Not Yet a Member?
Register with LinuxMagazine.com and get free access to the entire archive, including: