Errors when Statically Compiling PECL modules into PHP

If you get errors like: configure: WARNING: unrecognized options: --enable-apc when statically compiling PECL modules, such as APC into PHP, then ensure you have the proper version of autoconf installed (version 2.13). On Ubuntu that was fixed with a quick sudo apt-get install autoconf2.13

Then you can get back to removing your configure file and running ./buildconf --force before you re-compile.

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

PHP Framework Shoot Out

Bonnier Corp, my current employer, allows us to host the Orlando PHP Meet-Up group at our offices. It was recently resurrected after a year or so of lying dormant.

For the month of June we are going to be staging a ‘Code Shoot Out’between 4 of the most popular development frameworks for PHP: CakePHP, Zend Framework, Symfony, and Code Igniter.

The idea is simple: Each developer, who is already familiar with the framework they are using (in order to remove the learning curve all frameworks have from the equation), will take the same MySQL schema and create the same application with it. This way we the strengths and weaknesses of each framework could be compared in a relative way, instead of absolutely.

If you’re interested in attending, sign up and RSVP as soon as possible, as it is filling up quickly.

Continue reading