Koken in the Wild

Last week, a new platform was released for photographers, videographers, and artists. It’s called Koken.

Being the perennial tinkerer that I am, I thought I’d give it a whirl. To be fair, I wouldn’t call myself a developer. Not even a quasi-developer. I’d categorize myself as knowledgeably dangerous and obviously unknowledgable. Ok, so I’m a bit wiser than some on the web, but I’m not quitting my day job.

My voyage for these types of projects (like developing a new WordPress site) generally begins with developing locally so that I don’t need to invest in a big development environment. So, I headed to the Koken site and found the tech specs. At first glance, I thought “hot damn, I’m in.”  Mainly because I saw the need for PHP and MySQL and ignored the rest.

Herein lies the rub.

Apparently I can’t read. I missed the part about needing ImageMagick installed. I’d never heard of it before, so naturally, I hit up the Googles. (One thing I have learned is that I am a professional Googler.)

The documentation for ImageMagick seemed pretty straightforward. “Use MacPorts, it’ll be easiest*.” So I did. Then I realized I hadn’t had MacPorts installed on my laptop which I was working on. So I started that process:

• Download installer

• Run installer

• Realize I need Xcode installed

• Install Xcode

• Install Command Line Tools (In Xcode, Preferences->Downloads)

• Realize I need X11

• Headed over to XQuartz for an X11 download and install

• Log out and back in from my user to start the service

Ok. So by getting Xcode and X11 taken care of, now I had MacPorts installed (which, in the end is unnecessary). Sweet. So, I go back to the ImageMagick installation guide and read through it one more time. I had downloaded the zip file already, then I realized I didn’t need it (yet). In Terminal, I entered the following:

$ sudo port install ImageMagick

Ok. Then Terminal (which is a scary place for me) started doing a bunch of stuff. Then eventually it looked like it had completed. ImageMagick had some test code to see if it installed correctly:

$ convert logo: logo.gif

$ identify logo.gif

$ display logo.gif

Sweet. All of those commands worked!  I had succesfully gotten ImageMagick installed!

So, I fired up MAMP and then went back to the Koken install instructions which are awesomely simple:

• Download file and extract it

• Place the file in the root directory of your site

• Go to the site and watch the magic happen

So I did. The way MAMP works is it takes your Mac and turns it into a web server running Apache, MySQL and PHP (hence MAMP). When it’s running, you can go to localhost:8888 in a web browser, and that’s the root of your domain for your local environment. So, naturally, I went to localhost:8888/koken

What happened was awesome. It did this fantastic self-check to see if it would work on my “server”.

And then it fucking failed. About 15 times. The error that caused me the problems (which I was grateful it actually let me know WHAT was failing) was ImageMagick.

So, I went back and tried installing it all again.

Failed.

Eventually, after some more professional Googling, I found a great site that explained not how to get ImageMagick installed, but ImageMagick installed in a MAMP environment.

Those fucking /bin files, man.

Here’s the article that helped save my butt: http://www.maratz.com/blog/archives/2010/05/11/imagemagick-with-mamp/

Now, to note, there is something that had to be changed. In the instructions (borrowed below), there is a change based on the version of ImageMagick that is now current:

• Download the ImageMagick package and unarchive it in /Applications/MAMP/bin/ImageMagick     <—- you may need to create the file ImageMagick

• In Terminal, type the following three commands:

$ export  MAGICK_HOME="/Applications/MAMP/bin/ImageMagick/ImageMagick-6.8.3" 

$ export PATH="$MAGICK_HOME/bin:$PATH"

$ export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib"

• And then, we can run those same test from previous, but from the right directory:

$ cd /Applications/MAMP/bin/ImageMagick/ImageMagick-6.8.3

$ convert logo: logo.gif

$ identify logo.gif

$ display logo.gif

• Lastly, you need to edit the envars file located in /Applications/MAMP/Library/bin

• In the two uncommented lines, change them to:

DYLD_LIBRARY_PATH="/Applications/MAMP/bin/ImageMagick/ImageMagick-6.8.3/lib:/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH" export DYLD_LIBRARY_PATH

• Bask in your glory, as now ImageMagick is installed in the right damned place.

Ok, then back to localhost:8888/koken and it should work!

Then it fails.

The last change is to make sure that the directory that Koken is looking at is correct. In the box that Koken has, type: /Applications/MAMP/bin/ImageMagick/ImageMagick-6.8.3/

And THEN IT WORKS.

Until you get through the next screen and realize that you didn’t actually create a new database in MySQL yet. Head over to localhost:8888 and the MAMP start page should have a phpMyAdmin link on the top where you can log in, create a new database and go from there.

Now. It’s time for the fun part. Using Koken.  I was going to do this post with screenshots and then realized that I’d have to go through the process again. Needless to say, I’m going to pass on that for now and actually start working. Hopefully this will help you get to that point too!

7 thoughts on “Koken in the Wild”

  1. I tried installing imagemagik from here: http://cactuslab.com/imagemagick/ then manually setting the path from where it installed, but didn’t work for me either.

    1. @djmtype When you set the location for install, what was it? When Koken does the self test for the new server environment, you need to ensure that wherever it is, the install has to be in the same directory of MySQL to make it work.

      1. @mjwessty  @djmtype Instead of using Cactuslab’s package installer, I downloaded the binary from imagemagick.org instead. Then, i followed your tutorial (without installing macports) along with the one you reference in this post: http://www.maratz.com/blog/archives/2010/05/11/imagemagick-with-mamp/
        How i finally got it to work was by following the Addenum noted in the maratz.com post by changing the DYLD_LIBRARY_PATH to DYLD_LIBRARY_PATH=”/Applications/MAMP/bin/ImageMagick/ImageMagick-6.8.3/lib:$DYLD_LIBRARY_PATH”export DYLD_LIBRARY_PATH

  2. i m completly beginner with a web server SQL PHP….etc…i m just designer…do you advice me to follow all your step…because i m afraid to be quickly lost..thk
    claire

    1. @claireisfunky if you’re new to all this, I’d recommend getting a web host somewhere and do it. Locally is a complex ball game and hosting can be pretty cheap now a days.

Leave a Reply

Your email address will not be published. Required fields are marked *