sugarcrmdevelopers —  August 26, 2010 — Leave a comment

One of our developers recently upgraded MAMP to 1.9 on Snow Leopard, which includes imap support compiled into php but doesn’t include ssl. This meant he wasn’t able to access most of the basic mail accounts like Gmail.  He was kind enough to share his steps to resolve the issue, in the hopes of saving other developers some frustration:


1.  Download and install the c-client imap library into a directory of your choice, build the headers.
2.  Download 5.3.2 source form php, extract, and navigate to ext/imap
3.  Run phpize
4.  Configure, make, and copy the new objects to your php extension directory.  Configure command should be close to the following:

./configure –with-imap=/usr/local/imap-2007 –with-kerberos –with-imap-ssl=/usr/

5.  Restart apache verify from phpinfo


*With pcre during make process:

Copy the pcre.h header from your php download into /usr/include/php/ext/pcre if you get errors like “/usr/include/php/ext/pcre/php_pcre.h:44: error: expected specifier-qualifier-list before ‘pcre’
make: *** [php_imap.lo] Error 1”

sudo cp cd ~/php-5.3.2/ext/pcre/pcrelib/pcre.h /usr/include/php/ext/pcre/

*Wrong architecture

MAMP 1.8/1.9 is still a 32bit application so copy paste the following into your terminal before the configure command if you get a “wrong architecture on” when restarting apache in your error log.  Redo the build.

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”

No Comments

Be the first to start the conversation!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s