Logo

Thoom Technologies

  • Random
  • Archive
  • RSS

MAMP + Intl + Lion

Since I have started using Symfony2 on some projects I have been meaning to install the intl extension that Symfony recommends you install. I have tried several different methods, but believe that the one I listed below is easier and makes less of a mess than others.

First, get the ICU libraries. Then expand them and build the library:

tar xzvf icu4c-4_8_1_1-src.tgz
cd icu/source
./runConfigureICU MacOSX
make
sudo make install

If you have followed from my previous steps, you should have the php headers installed in the standard MAMP directory. We need to go to the intl ext folder:

cd /Applications/MAMP/bin/php/php5.3.6/include/php/ext/intl

From here, let’s build the intl.so file that we need to enable the extension:

phpize
./configure --enable-intl
make

Now we just need to copy the extension to the correct location and add an entry to our php.ini file:

cp modules/intl.so /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/
echo "extension=intl.so" >> /Applications/MAMP/bin/php/php5.3.6/conf/php.ini

Restart the MAMP servers and now you have the intl extension enabled!

    • #mamp
    • #symfony2
    • #intl
  • 1 year ago
  • 18
  • Comments
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Upgrading MAMP 2.0.x to MAMP 2.0.5

In previous articles, I upgraded my computer to Lion and took the time to install MAMP 2. I discovered while using some Zend Framework components that prior to MAMP 2.0.2, there was a bug with the iconv functions. This bug basically caused several pieces of the framework to timeout.

I had unfortunately installed MAMP 2.0.1, so I needed to update to the newest version so that I could again develop ZF-based applications on my local environment.

While following the previous MAMP tutorials I wrote, I realized that there are several changes to the default configuration that I needed to keep backups of so that I could make the same changes on the new version… MAMP apparently just copies over the old directory completely, it doesn’t make any intelligent updates (so you could lose VHOST, PHP, etc changes).

I kept the following backups:

  • /Applications/MAMP/conf/apache/httpd.conf
  • /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
  • /Applications/MAMP/bin/php/php5.3.6/conf/php.ini

It was a decently easy upgrade all things considered, but remember to keep backups of your local changes!

    • #mamp
    • #php 5.3
  • 1 year ago
  • 2
  • Comments
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Using MySQL Workbench with MAMP « Internet Strategy Guide

» I’ve been meaning to write a similar article. Now I won’t have to!

    • #MAMP
    • #MySQL Workbench
  • 1 year ago
  • 1
  • Comments
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

MAMP + Xdebug + Lion

In Part 1 of my MAMP + Lion series, I set up my MAMP installation so that I could use the included PECL installer. Then we installed OAuth. In Part 2, we installed MacPorts, then used PECL to install the ImageMagick “Imagick” extension. I decided to give you a breather and make this piece much simpler, so we’re going to install Xdebug. Originally this post was much longer since I didn’t think about checking for Xdebug until after I had already done a PECL install of the software. Perhaps in previous versions of MAMP this was a requirement, but with MAMP 2, the Xdebug extension has already been compiled. You just need to enable it.

Enabling Xdebug

To enable Xdebug, we need to edit the php.ini file. In this file, we need to uncomment the following line:

zend_extension="/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"

And add the following two lines to enable an IDE or stand-alone application access to Xdebug:

xdebug.remote_enable=1
xdebug.remote_autostart=1

With these changes made, just restart the apache process and Xdebug should be enabled. Simple, right?

The Xdebug GUI

I use PHPStorm as my IDE and it comes with a nice zero-configuration Xdebug set up. Basically, I just tell the application to start listening on my localhost. If you want to use a decent free application, there is MacGDBp. Just download and install and you should be good to go. See, I told you this piece would be simple! In part 4, we’ll get back into the terminal and install PHPUnit.

    • #mamp
    • #lion
    • #php
    • #xdebug
  • 1 year ago
  • Comments
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

MAMP + ImageMagick + Lion

In Part 1 of my MAMP + Lion series, I set up my MAMP installation so that I could use the included PECL installer. In this piece, I am going to explain how to install the php imagick extension. It’s going to be a little more work, but it builds on the foundation established in part one.

Install MacPorts

To begin, I followed the advice given by Mike Leo @ Unreal Expectations on installing imagick on snow leopard. Basically, in order to use the imagick extension, you need to install the ImageMagick libraries. I tried a few different routes, and came to agree with his assessment: use MacPorts.

There are a few downsides to using MacPorts, but it mostly comes down to the fact that you have to install XCode 4.1, which is a time-consuming download. Fortunately, it’s free on the Mac App Store. After you install XCode, install the Lion MacPorts binary.

Once you have MacPorts installed, you need to install ImageMagick. On my laptop, this took a long time, so be prepared to wait :). This is done simply in the terminal:

$ sudo port install ImageMagick

Install PHP Imagick

After the MacPorts library has finished installing, the rest of the process will be easier than it was with MAMP 1.X since MAMP 2 is no longer a universal binary. This means you don’t need to follow Mike’s installation process. Instead, the next step is to install using pecl, providing the Imagemagick prefix /opt/local when asked:

$ pecl install imagick
...
Please provide the prefix of Imagemagick installation [autodetect] : /opt/local

Now just include the new extension in the php.ini file:

echo "extension=imagick.so" >> /Applications/MAMP/bin/php/php5.3.6/conf/php.ini

From here, we need to update one of the MAMP dynamic libraries because it is too old. It’s pretty simple, but took me a while to figure out. Next time, I’ll make sure to look at the php-error logs when an extension doesn’t load!

$ cp /opt/local/lib/libfreetype.6.dylib /Applications/MAMP/Library/lib/

Restart the Apache process and you should now have the Imagick library installed! Part 3 of this series will focus on enabling Xdebug!

    • #MAMP
    • #Lion
    • #ImageMagick
    • #imagick
    • #php
  • 1 year ago
  • 4
  • Comments
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
Page 1 of 2
← Newer • Older →
A web consulting and development company focused on LAMP technologies
  • Developer-Free Tumblr
  • thoom on github
  • RSS
  • Random
  • Archive
  • Mobile

© 2013 Thoom Technologies.

Effector Theme by Pixel Union