Darryl E. Clarke

Linux, PHP, MySQL, Apache, Development and More . . .

Replacing a Live System RAID On The Fly

Well, this is one of those crazy fun things that I had to attempt. My old system drive consisted of two 80 GB IDE drives in a mirror configuration. Pretty standard, but they were getting sluggish and I happen to have a few 320GB SATA drives doing nothing.

This is not a tutorial. This is a step by step account of a process I took to replace my disks; This is to be taken only as a suggestion as your configuration and mileage may vary. There may also be a better way of doing this.

So, lo and behold, I plugged them in to my eSATA ports and started rolling over!  For the sake of this exercise the original drives will be sda, sdb. The new drives will be sdc and sdd. The raid device is md0. Read the rest of this entry »

Summer Project: Status Update

I’ve managed to get my little test server all configured for each path.  This little task involved configuring mod_ruby, mod_perl, mod_python on top of my already standard php. I also had to fire up mod_proxy to mask the jsp directory (which is really going to an apache tomcat server – another box on my network).

You can view the progress as I start building.  Progress is still fairly slow at this moment. But now that all the frameworks are in place and my apache ninja skills have been revived I should be able to kick it up a notch.

I’ve also made a slight change in how I’ll be storing the images in the database.  I’m going to just be doing a plain old base64 encode of the binary data.  I’d much rather just store binary data in the database as a central repository for all paths, but there appears to be some issues with this and the fact that the entire django community hates binary data in a database.  So I’m not going to fight it or waste any more time on it.

More Projects. More Fun. More Better Butter.

You’ll find a better description about Moments Like Today over on Margaret’s blog.  But, it’s another one of my summer time projects. If you feel you’re interested, join the facebook group and/or the vimeo group and prepare to have some fun.

In order to attack this project, I’ll be using PHP, Zend Framework, and a touch of magic to use Vimeo’s API.   For the photo portion of the site, I’ll likely avoid using PHP’s internal graphic tools (for quality purposes) and pull out some trickery with ImageMagick.

Feeling Up Django: First Impressions From a PHP Guy

As I whipped through the tutorial on getting started with Django I made some mental notes on things I thought were interesting and things I thought weren’t so interesting. I have a feeling I’ll be saying similar things about Ruby on Rails…

Read the rest of this entry »

PHP Java Bridge vs. Zend Platform Java Bridge

A long time ago I posted some instructions on installing PHP/Java Bridge on Ubuntu and that post is getting quite a few reads, so I figured I’d post a follow up on how it was used.

Over the last year I had been using a Java Bridge from a Zend Framework application to access a Java only API.  And really, between the two bridges there are no differences.  They both work identical, they both work great.  Would I pay Zend for Zend Platform’s Enterprise license? No.  Why? Because both bridges perform the same.  The only differences are:

  1. Zend’s Java bridge already has a function called java_require and the open source PHP/Java Bridge needs you to include a file.
  2. PHP/Java Bridge has a java_cast function, and you need it.  Zend’s Java Bridge does not have, or need this.

With these two differences all you need is a little code in your bootstrap (or somewhere else useful) to cover them and all is golden. Your app should work with both Java Bridges without any issue.

/* no java_require() include the java.inc for PHP/Java Bridge */
if ( ! function_exists('java_require') ) {
    include "java/Java.inc";
}

/* declare this, it doesn't exist with Zend Java, but is needed for PHP/Java Bridge */
if ( ! function_exists('java_cast')) {
    function java_cast($whatever) {
        return $whatever;
    }
}

There’s probably a more graceful way of checking and doing this but that’s it, and it’s worked on a multi tiered build environment for over a year now.