Hallelujah

I just ran across a powerfully moving song recorded by Jeff Buckley in 1994.  Apparently this song has been used in many movies, including Shrek and Lord of War.  I don’t know how I managed to miss it before. 

Cover of Jeff Buckley's CD Grace which contains Halleluja.The song is called Hallelujah.  It was written by Leonard Cohen in 1984 and has been covered by a number of artists in many different styles, but the version by Jeff Buckley is simply heart stopping.  He performs it with a single electric guitar and his voice.  It is becomes even more powerful when you listen to it in light of Buckley’s tragic life, and untimely death by drowning in 1997.

The song has a tragic, melancholy feel to it, and Buckley sounds as though his soul is crying out to God for hope while simultaneously lamenting the pain and tragedy of life.

I have read a number of interpretations of the lyrics on various web sites.  Some say it is not religious at all, but is rather a song about the pain of love in general.  This song spoke to me on a very spiritual level, however.  It is about the fall of man on a very personal level – the fall that everyone experiences away from God.  Some lament this fall (as Buckley does here), while others pay little attention to it, or find it irrelevant.

The opening verse includes imagery of David playing music to the lord and praising him.  This describes a time in man’s life when he is walking with God, though amazed, and confused by eternity – but singing Hallelujah (Praise the Lord).

The second verse goes on to describe the fall.  It again uses imagery of David with his seduction by sin (when he sees Bathsheba bathing in the moonlight.  He succumbs to the beauty of sin, which proceeds to enslave him (ties him to her kitchen chair), and remove the love of god from his heart (from your lips she drew the hallelujah).

The third verse describes life after the fall.  He knows this life all too well, as he lived it before he knew God.  It is cold and lonely in this place, but he is helpless to return to God by this time.  He sees evidence of God (the flag on the marble arch), but all he has left are cold and broken hallelujahs.

The fourth verse shifts gears a little bit, allowing God to share his thoughts on the matter.  He is sad that the man no longer talks to him, and he reminisces of the time that he used to move in the man and when their every breath was hallelujah.

The fifth, and final verse, is ultimately sad, as, by this time, the man is completely disillusioned with God, love, and religion.  He is no longer even sure if God exists, and he questions whether love even exists, as he has seen terrible pain spread under the guise of love.

Click here to see a video of Jeff Buckley performing Hallelujah live (from YouTube).

 

Camping on the island

I’ll be camping for the next few days on Vancouver Island with some friends.  We don’t know exactly where we will be going.  We’re just going to drive until we find a good spot.  Then we will set up camp and relax.

It may be difficult to get away from work, but I think my soul needs this break. 

Source Guardian

This is a follow-up on my experimentation with PHP compilers.  After trying Bcompiler and choosing not to use Zend Guard, I tried out Source Guardian.  It will compile PHP into byte codes for either PHP 4 or PHP5 using a command line executable (or a GUI in Windows).  The PHP file is encoded in place and can be used just as if it wasn’t encoded at all.  You only need to copy a directory of dynamic php extensions into a parent folder of the script (e.g. the web server’s document root would work fine) which are used to decode and run the encoded script.

I tried this out and it worked flawlessly.  Not only that, but this product opens doors to add limited licensing to your products.  You can, for example, set an expiry date on code, or stipulate that the code can only be run on a certain IP or MAC address.

All I can say is that I will definitely be purchasing this product and I recommend it for anyone who distributes PHP source code and doesn’t want to give away all intellectual property. 

Adventures with PHP Compilers

I am in a situation where I need to protect some intellectual property in a PHP script.  The recommended solution is to use a code obfuscator (or compiler) to encode the script.  Currently the landscape leaves much to be desired in this area as far as PHP is concerned.  The industry standard seems to be Zend Guard (http://www.zend.com/products/zend_guard) which is created by Zend – the guys who make PHP – but this has a couple of down sides:

  1. It costs $1000 US.
  2. The web server must be equipped with the Zend Optimizer extension in order to run encoded scripts. AFAIK this extension needs to be compiled statically into PHP.  This would drastically reduce the portability of my scripts. 

The biggest open-source compiler is bcompiler (http://php.net/bcompiler), a PECL extension.  Code that is compiled using this extension can be run with the assistance of the bcompiler extension.  Since bcompiler is a dynamic extension (i.e. it can be loaded at run time) it is theoretically much easier for users to install it (for my script).  Not a perfect solution, but I was willing to accept this hassle in order to ensure the protection of my intellectual property. 

In the past I have had nothing but bad experiences with PECL.  The extensions never install like they are supposed to.  If you make it past the compilation errors and actually get it installed, it is usually an ordeal to turn it on, and can be even more difficult to get it working properly.  These problems are usually related to incompatibilities with versions of gcc, automake, libtool, etc.., and a few hours (or sometimes days) reading through the PECL bugtracker can usually get these problems solved, but, … you get the point.

Unfortunately my experience with bcompiler was no better.   I tried installing it on my laptop running OS X 10.4 and PHP 4.3 (and also PHP 5), but couldn’t get past make.  It gave an undescriptive error "Make failed".  A little bit of googling revealed that bcompiler may be incompatible with GCC 4.x – a bug report suggested I downgrade to version 3.x.  Frankly, I don’t feel like installing an older version of GCC just to get bcompiler to install.

No problem, I don’t need it to run on my lap top.  I have a web host running red hat linux.  Surly it will compile on there.  In fact it did compile.  After about 45 minutes of tinkering with the php.ini file and the bcompiler.so file, I was even able to compile a simple php script into bytecode with the help of bencoder (http://bbs.giga.net.tw/bencoder.php) a script created by Shen Cheng-Da to harness the power of bcompiler.  The only problem is that the compiled code doesn’t work properly.  I can include the compiled script into another script, but cannot call any methods from it – and the script gives a Segmentation Fault on exit without any explanation.

I’ve looked far and wide for a solution to this one.  PECL bug tracker is full of reports of segmentation faults but the solutions don’t appear to transfer easily to this context.

Conclusion:  bcompiler is not ready for primetime yet.  Please someone correct me if I’m wrong on this point.

On to another commercial compiler: Source Guardian.  This is perhaps the most promising of the bunch.  It takes an approach similar to bcompiler in that scripts encoded with this product can be run on any server using a dynamic php extension.  The difference is that this is much more polished and feature rich, and the dynamic php extension is distributed as a binary, so the user doesn’t have to mess around with make and gcc.

I downloaded a 30 trial version of this software and tried to encode one of my scripts.  I am still in the process of trying to get this to work, … I’ll let you all know how it goes.

IFTPd

Ran across IFTPd (http://iftpd.sourceforge.net/)today and installed it on my westhost server.  This is great because I can run it on my virtual private server and create accounts for multiple users giving them access to exactly what they need access to.  It has a simple mechanism for defining groups and users, allowing you to create virtual file systems for the users and groups to work on. 

The default FTP daemon on my server was a little more difficult to work with, confining users to only their home ftp directory.  This is insufficient when there are multiple group projects under way.

IFTPd is also written entirely in Java and is distributed with all dependencies, so getting it running was a snap.

Still looking for a similar product for SSH, but for now, this works GREAT! 

 

Back down to earth

After our amazing victory against the decepticons we succombed to the lesser (yet still more talented than us) District 5.  Our 12 minutes in penalties didn’t help.  As a forward I didn’t get to play very much because we were short-handed so much.  The floor was quite slippery and difficult to play on.  None-the-less we gave a good effort and I am proud of our team.

 We still have at least one more game tomorrow (Thursday) against the Jumping Jalepenos at Killarney at 8:45pm.  We will be missing some core players due to injuries and suspensions, and our number one goalie will be MIA, but we will do our best to best these guys.