Wednesday, April 29, 2009

For want of a nail

I've been making good progress with PHP these past few days. I did some work with cookies and then moved on to session variables, only to find... that my copy of PHP doesn't support session variables. It's an option that must be selected when you build PHP.

I'm using PHP as installed by the SuSE 9.2 Linux distro. That version, out of the box, does not support session variables. Apparently, an update changed PHP and enabled the session variables. But SuSE stopped supporting version 9.2 a while ago, and the updates are not available.

I *could* re-build PHP myself. That's work that takes me away from my goal (learning to build applications in PHP).

Another option is to upgrade the SuSE Linux distro on //grendel, the computer hosting Apache and PHP. When SuSE/Novell don't offer online updates for version 9.2, I have the CDs for later versions (10.0, 10.1, and 11.0). But that update is not so easy; it requires more memory than //grendel currently has. (The PC has 128MB RAM, and SuSE 10.0 wants 256MB.)

Adding memory is possible: Memory is available and //grendel has two open RAM slots. All I have to do is buy the memory stick.

But I promised myself that I would refrain from spending money on my home PCs until I can fund the expenditure, that is, until I have some income. Not just as a way of conserving resources, but as an incentive to secure income. I'm not sure that I want to break that promise.

So I put PHP aside today and went back to Perl and my 'dbase' utility, which performs simple data table operations. One version of 'dbase' uses plain text files; another version will use Perl's DBI module to talk to MySQL databases. I have completed about a third of the text-only version, with simple script processing and the ability to append a complete record to a table. The 'update' and 'select' functions are next.

The dbase program will give me experience with Perl's DBI module, MySQL, and simple SQL. It is also a useful program; I will track program size with it. I want to measure the size of programs that I write, and see how they grow over their life. The dbase program will be a convenient way to store lines of code counts.

No comments:

Post a Comment