Upgrading PEAR on Mac OSX Tiger

It’s annoying sometimes having to upgrade or install opensource applications on Mac OSX. Yes, it’s BSD Unix, but it’s not quite Linux when it comes to raw package management from command prompts and how some applications assume you are installing it on Linux. On my fresh install of Tiger, I was having some issues upgrade PEAR. Because it’s not really documented anywhere, here’s how I did it:

1. Follow the upgrade instruction on PEAR’s official website.

2. Once PEAR is upgraded, issuing

1
$: pear -V

from the command prompt should still give you an old version of PEAR as such:

1
PEAR Version: 1.3.6

3. To fix that, find out where the current version of PEAR is by issuing:

1
$: which pear

It should return:

1
$: /usr/bin/pear

4. Then find out where the upgraded PEAR went by issuing:

1
$: pear config-show

Look for:

1
PEAR executables directory   bin_dir

In my case, it resides in where PHP5 is at:

1
PEAR executables directory   bin_dir   /usr/local/php5/bin

5. Next I make a symbolic link to it from where

1
/usr/bin/pear

is:

1
2
$: mv /usr/bin/pear /usr/bin/pear.old
$: sudo ln -s /usr/local/php5/bin/pear pear

6. Do another

1
$: pear -V

and it should now show the proper version:

1
PEAR Version: 1.5.3

Overlapping Audio Tracks in Safari

Apple’s Safari is definitely a work in progress with the kind of weird bugs I keep running into. One of the bugs I hadn’t documented about is overlapping audio tracks in Safari under a very special circumstance.

The issue is this: When using AJAX to load one quicktime clip over another, if the first movie hadn’t finished playing as the second movie is loaded in via AJAX, the user will hear the audio tracks of both movie clips playing at the same time. I have no idea why that is, and I am not even going try to guess. And apparently this has not been documented (or the little that I’ve found in Google) by any developer that I know of…

Fortunately there’s a quick fix to this problem (or my clients will drive me crazy). The upside is that this problem can be mitigated with a quick Javascript since the Quicktime object supports Javascript controls. And here’s how it’s done. We all know websites, especially college ones, are reliable and all, you know, their content never changes and they never disappear… But I decided to keep a snapshot of it anyway for future reference. Apple also has a couple of decent documentations on the subject.

Basically I used Javascript to stop playback of the first video before the second one is even loaded in by embedding the event as

1
onClick

. In some cases, it may help to dynamically embed it in the

1
< body>

tag as

1
onLoad

.

An interesting side note: Javascript documentation says that

1
onLoad

events can be triggered with

1
< body>, < iframe>, < frameset>, < img>

and

1
< object>

tags in HTML, but in reality, use of

1
< iframe>

and

1
< object>

are weird among browsers.

IE6, IE7, Firefox, Opera — support

1
onLoad

in the

1
< iframe>

tag, but they do not support it in the

1
< object>

tag.
Safari — the only loner browser that supports

1
onLoad

in the

1
< object>

tag, but NOT the

1
< iframe>

tag…

Sometimes it can really suck being a web developer.

Apple Aperture Rocks!

I went to a free Pro Workshop session at our local Apple Store at Valley Fair mall last night for Apple’s Aperture software. It’s one of those “pro” apps that allows photographers to manage, edit and output photos through an efficient workflow with high quality reasults. All I have to say about Aperture is… WOW! (Sorry, Microsoft… didn’t mean to steal your slogan.)

There are a few quirks in the software that I didn’t really like about though…
1. Edited results will not show up in iPhoto (where photo albums can be shared and do other things that Aperture can’t do).
2. No selective sharpening for now.
3. No RAW support for the DSRL I want (yet).

But I liked the fact that it’s a non-destructive editing process where the master image is never touched/altered in anyway. It took Adobe long enough to figure that one out in CS3 and the revival of Lightroom. Adobe is beginning to become the Microsoft of the creative industry it seems — moving slow with bloated products that don’t improve much over versions… But I digress…

How Much More Can Hotmail Suck?

I gave up on using Hotmail a few months ago. But from time to time I’ve had to log back in to retrieve pieces of information I needed. Today I went back for the first time in months and discovered that my inbox was full of junk mail… all 1500+ of them! And the “Junk Mail” box? Less than 200…

Unlike Gmail or Yahoo, where junk mail filtering success rate is practically 98+%, Hotmail is the exact opposite. Talk about being a miserable failure.

Microsoft seems to be producing a bunch of flops lately… Everything from Hotmail, XBox game console, Zune music player to Windows Vista is pretty sucky. Unfortunately, millions of people still use its products willingly or not. Many businesses are locked in to Microsoft’s products partly because the only kinds of applications they need only exist on Windows (though that’s been less likely the case since the resurgence of the Macs).

I hope Microsoft loses enough market share to Apple and other competitors in all markets to make them feel vulnerable and start innovating again. I mean, com’on, five years and five BILLION dollars on a copycat of Mac OSX is NOT innovation. But of course, the culture for innovation just isn’t in Microsoft’s blood. So it’s kind of oxymoron to put the word “innovation” and “Microsoft” in the same sentence…. there, I just did it again…

Done with Java Programming Class

Today was the last day of the intensive Java programming class. I actually completed the final project ahead of my estimated scheduled time. I even had enough time to complete a make-up assignment I didn’t turn in. This class was especially tough because it was one of those “part one” and “part two” courses rolled into one. I kind of started falling behind during the second half of the class.

Knowing more about Java now made me realized something — PHP is a relatively easy language to pick up and for someone to be comfortable with. But precisely because of these “advantages”, PHP also makes someone without strong programming fundamentals a lazy programmer. Now that I know more about Objected Oriented programming with a “proper” language, I shall apply similar concepts to my future PHP projects. But I hope I get to work on Java programming more so some of that good stuff will actually stick!

Making Sense of Gibberish

Kon
Yesterday Bryan asked for “kon” and insisted on having it. But I just had no idea what he wanted. So I kept on asking him to tell me what it was he wanted…

Then I realized Grace was boiling some “CORN” and he wanted some of that!

Frustrated
Grace asked if Bryan wanted to take a nap, Bryan replied with “bus,” which meant he wanted to see (or that he saw) a bus. Ignoring him on purpose to test his reaction, Grace asked again if he wanted to take a nap. And Bryan kept replying, “Bus.” After a couple of rounds of this, Bryan finally covered his face with both of his hands, eyes closed, leaning forward and grunted and repeated one more time, “buuuuuuus!”

Although I didn’t see this myself, it’s still pretty funning based on descriptions from Grace…

Laptop Backup

In preparation to completely wipe my laptop hard drive clean and reinstall Mac OSX (it’s been a couple of years), I got a giant Western Digital My Book drive to back all my data to. Since it’s got two 500GB hard drives in it, I knew making it a mirrored RAID 1 drive would be the ideal solution for a peace of mind (that means making the two drives as if it’s only one, only files backed up to it will be mirrored, or synchronized, on both drives in case if one of the drives fails, all that data is still safe and sound on the 2nd drive).

Unfortunately Western Digital’s hardware doesn’t allow Apple’s Disk Utility to manage it. I ended up having to install Western Digital’s custom RAID utility. Sucks.

The initial backup took about 3 hours to backup about 35GB of data — not very fast. But then again, it’s software RAID. It’s not supposed to be fast anyway.

So now that I have all my stuff backed up. Next week I will be able to finally reinstall OSX and see if the damn machine runs any faster.

Next is to back up all those digital photos stored on Grace’s Mac, which was the real reason I bought this drive in the first place.

Minor Server Hiccups

After we moved all the data from our old Texas ServerBeach machine to the new one in L.A., the new server kept on rebooting itself sporadically. Loz and I monitored and went through the logs for almost two days but couldn’t find anything wrong with it (especially after Loz installed a couple of nice monitoring software). Let me tell ya, having a server that reboots itself whenever it wanted to was stressful.

Good thing the tech support guys at ServerBeach did their thing and swapped out the box for us within an hour of submitting a support ticket. And then 40 minutes after that, we were back in business. I gotta say, I agree with Lawrence, ServerBeach has been pretty good with the kind of service we’ve received so far!

On a similar note, I had a client whose dedicated server was (and I assume still is) hosted with EV1 Servers (now part of The Planet, a company Loz and I were thinking about using but went with ServerBeach instead). And their service was just awful. I received more support from peer users in their discussion board than from EV1’s tech support (all I got was a templated response which offended me quite a bit for the kind of money my client was paying them).

Life is good again.

Removing that Skunk Odor

Thank goodness for science. There is a way to remove the stupid skunk odor.

Skunk Odor Remover

We got a bottle of “Nature’s Miracle Skunk Odor Remover.” So far it’s not quite close to the claim of being “miracle” yet. But it’s removed about 90% of the smell. I am still trying to figure out where the remaining 10% is coming from… Even if the smell is completely gone, I have a feeling that psychologically we’ll always be able to smell it…