Archive for the ‘Apple’ Category

Flip4Mac WMV 2.3.0.11 Beta is Out with Snow Leopard Support

Thursday, September 17th, 2009

This morning I saw that Flip4Mac WMV - the free add-on to QuickTime to view Windows media files, had a new beta that was Snow Leopard ready. I tried to get it, but the disk image wasn't mountable, and submitted a 'ticket' to them. In a few hours, they had a new download file on the site and it worked just fine.

This guy had a 64-bit Pref Pane, which was nice as all the others I have are all 64-bit and I didn't want to fall back to the 32-bit System Preferences app. With this, I get what I need. Nice.

Getting PostgreSQL Support into PHP 5.3.0 on Mac OS X 10.6

Wednesday, September 16th, 2009

PostgreSQL.jpg

One of my favorite web scripting languages is PHP. To me, it seems that it's right in the sweet spot of powerful yet fundamentally a scripting language. That means that it's much more lightweight for a developer than, say Java/JSP, and at the same time, more C-like than, say Perl. While there is a place for almost all of the web technologies in today's development environment, I have to say, PHP holds a really special place in my heart.

Because of that, I was thrilled over the years to see Marc Liyanage continue to produce a great PHP distribution with all the bells and whistles - including my favorite database - PostgreSQL. For the last several OS releases, Apple has delivered a PHP component to Apache, they leave out the PostgreSQL support that I need to do the few scripting-based web projects that I have.

Not Playing Well with Snow Leopard

But with the introduction of Snow Leopard - Mac OS X 10.6, Marc hasn't been able to build a PHP distribution that is compatible with the OS. So when I ran across this article about building the PostgreSQL support for PHP into the Snow Leopard Apache install, I had to jump at it for several reasons:

  • It's low-impact. I don't have to get rid of all the suport that Apple has in it's PHP install.
  • It's independent of Marc, so I don't have to wait on him to release compelte updates to PHP.

So it is with excitement that I venture off on my own to build the PostgreSQL support into Snow Leopard's Apache server and forever empower myself to keep PostgreSQL support in PHP as it ships from Apple.

Let's get to it!

According to the write-up, we need to set the bash variables:

  MACOSX_DEPLOYMENT_TARGET=10.6
  CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp"
  CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
  CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
  LDFLAGS="-arch i386 -arch x86_64 -bind_at_load"
  export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET

but we can also use the tcsh variable scheme:

  setenv MACOSX_DEPLOYMENT_TARGET 10.6
  setenv CFLAGS "-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp"
  setenv CCFLAGS "-arch i386 -arch x86_64 -g -Os -pipe"
  setenv CXXFLAGS "-arch i386 -arch x86_64 -g -Os -pipe"
  setenv LDFLAGS "-arch i386 -arch x86_64 -bind_at_load"

Then I get into the PHP 5.3.0 source code at: php-5.3.0/ext/pgsql/ and run the commands to build the module:

  phpize
  ./configure
  make

The end result being that in php-5.3.0/ext/pgsql/.libs/ there is now pgsql.so that's ready to be used with PHP. All we need to do is to copy into the right place: (assuming we're still in the php-5.3.0/ext/pgsql directory)

  sudo cp .libs/pgsql.so /usr/lib/php/extensions/no-debug-non-zts-20090626

and then edit the /etc/php.ini file to tell it about the addition. This is a two-step process, as we need to update the commented-out line:

  ;extension_dir=./

to:

  extension_dir=/usr/lib/php/extensions/no-debug-non-zts-20090626

and then add in the line:

  extension=pgsql.so

after all the Windows examples of loadable modules.

A quick restart with:

  sudo apachectl restart

and then the system is all ready to go!

Results

It's amazing to see the show up with the familiar 'pgsql' section:

phpinfo()

And with this, I can dump Marc's PHP distribution and not have to worry about his updates any longer. The feeling of freedom and independence this gives me is really hard to express. It's fantastic!

UPDATE: this seems to be working, but when I look at /var/log/apache2/error_log I see a bunch of:

dyld: lazy symbol binding failed: Symbol not found: _PQconnectdb
  Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20090626/pgsql.so
  Expected in: flat namespace

dyld: Symbol not found: _PQconnectdb
  Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20090626/pgsql.so
  Expected in: flat namespace

when I try to run a simple PHP script to hit a PostgreSQL database and pull back a little data. I have a bad feeling that it's a 32-bit/64-bit issue as the libraries are most likely 32-bit and I'm guessing Apache2 is 64-bit from Apple.

Indeed... the file type of the libpq.5.dylib library in use is ppc and i386, but the pgsql.so is i386 and x86_64. But I'm betting that httpd is x86_64. This means I need to update to a 64-bit version of PostgreSQL for the Mac. Marc L doesn't have one. I wonder if that means I'm on my own, or if I can get something built for me?

[9/18] UPDATE: when I updated from PostgreSQL 8.3.0 by Marc L. to the 8.3.7-3 from William Kyngesburye, and repeated the build, the 64-bit (actually 32-bit and 64-bit) libraries were all I needed. The test page was perfect without any errors:

PHP PostgreSQL Test

Growl 1.2b3 is Out

Monday, September 14th, 2009

The guys working on Growl have delivered a new beta: 1.2b3 and in an interesting twist, you need to run the 1.2b3 uninstaller before installing 1.2b3. Clearly, there was something missing in the previous uninstaller, and the new one was necessary to "clear the decks" for the new beta. Fair enough, it's done and we're on the latest beta.

DrawIt 3.9 is Out – Snow Leopard Only

Friday, September 11th, 2009

Well... I didn't think they'd do it this quickly, but DrawIt has released 3.9 which is for Snow Leopard only. Seems there's something to it as the update notes say:

IMPORTANT: This version only works well with 10.6 Snow Leopard. If you are still on Leopard, do not upgrade to version 3.9.

DrawIt 3.9 brings several improvements to DrawIt in stability, memory usage and speed, but it only works on Snow Leopard.

I'm glad to see it. The upgrade cost was under $50 for everyone, and that's cheap by any standards. So it's nice to see developers take advantage of new features. There's nothing wrong with being a version behind on some boxes, but moving forward is nice too.

Audio Hijack Pro 2.9.3 is Out with Snow Leopard Support

Thursday, September 10th, 2009

I just got a tweet that the last of the Rogue Amoeba apps of mine is now Snow Leopard compatible:

Audio Hijack Pro 2.9.3 brings full Mac OS X 10.6 (Snow Leopard) compatibility, including updates to the Instant Hijack and System Audio (Soundflower) extras, as well as several important bug fixes.

So I had to get it! Fantastic.

Firefox 3.5.3 is Out

Thursday, September 10th, 2009

With more stability and security fixes, Firefox 3.5.3 is out. I hadn't had any issues with Snow Leopard, but it's nice to stay on top of the fixes due to the number of idiot kids hacking crud together to try and take over a few machines to show they are smart. Better safe than sorry.

ZeusDraw 1.3.4 is Out with Snow Leopard Support

Thursday, September 10th, 2009

Well, as promised, ZeusDraw 1.3.4 is out and comes with Snow Leopard support. I've used this for a lot of projects, and I have to say, while it's not as nice as I might wish it were, there are very few things that I need to do that it can't do. Now I can do them in Snow Leopard - even better.

Dropbox 0.7.17 Beta Fixes Snow Leopard Issues

Thursday, September 10th, 2009

Well, this is one in the books now... Dropbox has a beta that should fix all the Snow Leopard issues. While it's not the final release, it's a good step in the right direction and over the course of the next few weeks, I expect Adium and Growl to follow suit.

Apple Releases iTunes 9 and iPhone OS 3.1

Wednesday, September 9th, 2009

iPhone3GS.jpg

Their 'event' today was certainly about the music, and the new features in iTunes 9 are pretty nice, for the little I've played with them. I like the application management, and the re-done iTunes Store within iTunes. I'm a little surprised that they changed the behavior of the "minimize button" to actually minimize the window. Now it's called the "mini View" and is a menu selection and keyboard shortcut. I suppose this is a good thing, but it is a little odd that they made this change.

Then there's the iPhone OS 3.1 which adds a few nice features and sets the stage for AT&T to actually enable MMS. I'm willing to bet there are a few holes plugged - like the tethering hack and possibly a few of the jailbreaks, but who knows. I don't do either, and don't plan to. But I got that as well, and it was nice and painless.

So a couple of nice things in addition to the new iPod Touch and Nano hardware. I have to admit, these iPods are getting really pretty darn nice. But I've got my iPhone now, and that's going to be all I need.

VoodooPad (Pro) 4.2 and 4.2.1 are Out

Tuesday, September 8th, 2009

Today I saw a tweet from Flying Meat, and VoodooPad (Pro) 4.2 (and then quickly 4.2.1) are out with a twist - the "Pro" is now folded into the "regular" so that there's only the 'Lite' and the 'regular'. I can see his point of wanting to simplify things, and maintain a single codebase, so it doesn't bother me. I'm sure at the next major update, I'll get back "off" the Pro version with the rest of the Pro users.

But it's nice to see fixes there for Snow Leopard issues - as I've taken the plunge already.