Installing ImageMagick and imagick via MacPorts

Installing ImageMagick with MacPorts couldn’t be easier:


sudo port install ImageMagick

But getting it to work with your PHP installation is a bit harder. If you’ve installed PHP via MacPorts with the pear variant you can install the imagick extension via pecl:


sudo pecl install imagick

The trick to getting it to stop complaining about the Wand-config path, is by passing it the proper prefix for ImageMagick. When prompted, hit 1, then enter in:

/opt/local

Now just add this to the end of your php.ini file, and reboot apache:


[imagemagick]
extension=imagick.so

Installing Sphinx on OS X for PHP

I’m starting to use sphinx in my work, and wanted to get a solid development environment set up for it on my local OS X server. Since I built my local server with Mac Ports, it was actually pretty easy to get that installed:

sudo port install sphinx

However, I had trouble setting up the PHP extension for the Sphinx API. I could have used the sphinxapi.php that ships with the sphinx source code, but having a compiled extension is faster, and I don’t have to add more files to my php project. Installing Sphinx via Mac Ports didn’t help either, because it doesn’t install libsphinxclient, which is required to build the PHP Extension. That was until I found some instructions from someone doing something similar for Ruby.

Continue reading

Redirect all traffic to a new site with Apache .htaccess

The easiest way to redirect all traffic from an old site to a new site is to use mod_rewrite with Apache in your .htaccess file. If this file does not already exist in the root of your site’s public folder, then go ahead and create it with a text editor. I suggest using vim.

Then pop this into it:

RewriteEngine On
RewriteRule (.*) http://new.example.com/$1 [L]

The above recipe has the added benefit of also appending the page the user was requesting to the end, so if the new site is a clone of the old site then this will ensure that your users get the page that they requested. There are easier ways to do this if you are just changing URLs out and the site will be on the same server, but this is the easiest way to redirect all traffic if the new site is on a different box all together.

Ignite Orlando

IgniteOrlando is an event that couples rapid-fire talks with a ‘maker’project. This event started in Seattle, but takes place around the globe. The talks last 5 minutes and consist of 20 slides that are automatically rotated every 15 seconds. As you can imagine this places some interesting limits on that kind of presentation you can put together. As you probably know, limits have an uncanny knack of making you more creative.

Tomorrow night is Orlando’s first Ignite event, and once you take a gander at the line-up (yours truly included), and I think you’ll agree that we are in for one hell of a show. If you haven’t RSVP’d for the event, do so now. If you have, then I’ll see you tomorrow night at 6pm!

Location:
Slingapours, Wall Street Plaza (downtown)
27 Wall Street Plaza
Orlando, FL 32801

Free Parking courtesy of CoLab Orlando.