contact subscribe

PHP4 Creole

My current CATCH-22: I want to use the Propel and Creole libraries which require PHP5. Unfortunately, for now, most client environments have not made the upgrade from PHP4, and probably won’t for several months at the minimum. So, though I don’t like it, I need to have a PHP4 solution. The second problem: My G5 is currently being used as a testing server at my office, so I can’t scrap PHP4 for PHP5 on that machine either. (There are a few published solutions for running both concurrently, but I don’t have time to try them — yet.)

But back to the original intent of this post: grabbing the php4 ports of creole and propel.

Grab the PHP4 Ports

PHP4 ports for both libraries are available through CVS. To grab the PHP4 ports, you must have a working version (and knowledge) of CVS.

First, login anonymously to the CVS repository located at http://cvs.tigris.org:

$ cvs -d :pserver:anoncvs@cvs.tigris.org:/cvs login

Then, checkout the modules we need from the repository. First, let’s make a temporary directory:

$ mkdir ~/temp-project; cd ~/temp-project

And then actually check out the projects:

$ cvs -d :pserver:anoncvs@cvs.tigris.org:/cvs checkout phing
$ cvs -d :pserver:anoncvs@cvs.tigris.org:/cvs checkout creole
$ cvs -d :pserver:anoncvs@cvs.tigris.org:/cvs checkout propel

I checked out Phing as well, which is needed to auto-build your custom data access objects for propel.

As you peruse the now-created directories, you will notice that both creole and propel have *-php4 directories.

The Hitch

After some searching, it is apparent that the only way to create Propel DAO Objects is to use Phing (PHP5 only). So, there really isn’t a PHP4-only solution. You absolutely have to have (at least) a PHP5 CLI executable in order to build the PHP4 versions of the Propel library for your particular database.

Creole, however, does not require a complicated build process. And it appears to be a very well-organized abstraction layer for PHP. So I’m seriously contemplating rolling my own home-grown DAO using Creole rather than dealing with the mess of using Propel.

But that’s stupid. The only thing in my way is compiling PHP5 on my box in such a way as to maintain PHP4 there as well. Which shouldn’t be that hard.

But it is annoying.


If you see me at my desk, and I don’t appear to be doing anything other than staring at the monitor, these are the types of things I’m thinking about.

Post Your Comment




Remember Me?