Enabling IMAP support under OS X Leopard

bsoremsugar —  August 26, 2008 — 38 Comments

With the release of Mac OS X 10.5 Leopard last fall, Apple (finally) included a modern version of PHP (currently version 5.2.6 as of this writing). With it comes several improvements in the areas of performance, web services support (including extensions for JSON and XML), OOP, and error handling. However, the default install of PHP that Apple included didn’t include all of the available PHP extensions. Most notable is the IMAP extension, which is used in SugarCRM for the Campaigns and Emails modules. However you can build this extension and have it loaded dynamically, without affecting the rest of the default PHP install.

First, we’ll need to compile the c-client imap libraries, which can be obtained at ftp://ftp.cac.washington.edu/imap/. Notice the make command below; it has extra arguments added to be sure we are building the libraries as universal binaries, which is important since mod_php and apache are both compiled for 64-bit architecture.

$ curl -O ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
$ tar -zxvf c-client.tar.Z
$ cd imap-2007b
$ make oxp EXTRACFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os  -pipe -no-cpp-precomp"

We’ll then copy the libraries we built to the /usr/local directory, which is a place we can put any user-built programs and libraries and won’t affect the base system install.

$ sudo cp c-client/*.h /usr/local/include/
$ sudo cp c-client/*.c /usr/local/lib
$ sudo cp c-client/c-client.a /usr/local/lib/libc-client.a

Next, we’ll grab the PHP tarball for the version of PHP we are using, which is currently 5.2.6, from the source: http://www.php.net/downloads.

$ curl -O http://www.php.net/distributions/php-5.2.6.tar.bz2
$ tar -xjf php-5.2.6.tar.bz2

Now we’ll go to the source directory of the imap extension and compile it. Again you’ll notice the additional agruments added for building the extension as a universal binary. ( Edit: note that the configure line below is multiple lines; each new command to enter is denoted by the $ at the beginning of the line, although the $ is not part of the command ).

$ phpize
$ MACOSX_DEPLOYMENT_TARGET=10.5 
CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os  -pipe -no-cpp-precomp" 
CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os  -pipe" 
CXXFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os  -pipe" 
LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load" 
./configure --with-kerberos --with-imap-ssl
$ make
$ sudo make install
$ sudo echo "extension=imap.so" >> /etc/php.ini

Also, you’ll want to comment out the line ‘extension_dir = “./”‘ in the php.ini file, since it will interfere with the extension loading.

Finally, restart apache and you should see the imap extension listed in the output of phpinfo().

phpinfo() output showing imap enabled

38 responses to Enabling IMAP support under OS X Leopard

  1. 

    I’d suggest that all the instruction lines be included in this posting, so that neophytes can follow every step properly. This would mean adding:

    sudo mkdir -p /SourceCache
    cd /SourceCache

    at the top of the instructions. Then, before “Next, we’ll grab the PHP tarball…” again add this:

    cd /SourceCache

    I’d also use the Apple-blessed latest php tarball at http://www.opensource.apple.com/darwinsource/10.5.4/apache_mod_php-44/php-5.2.5.tar.bz2 (Note that Apple has a directory tree for each Mac OS version.)

    The instruction “Now we’ll go to the source directory of the imap extension” needs to be spelled out:

    cd /SourceCache/php-5.2.5/ext/imap

    I’d recommend putting multi-line instructions on a single,unwrapped line in the browser, so that they can be reliably copied from the browser and pasted into the terminal window.

    After the configure, I did a make test and got all kinds of warnings and errors about signedness (for both Apple’s tarball and the php tarball). It does not seem that the instructions will work on Leopard Server. :-/

  2. 

    I’d suggest that all the instruction lines be included in this posting, so that neophytes can follow every step properly. This would mean adding:

    sudo mkdir -p /SourceCache
    cd /SourceCache

    at the top of the instructions. Then, before “Next, we’ll grab the PHP tarball…” again add this:

    cd /SourceCache

    I’d also use the Apple-blessed latest php tarball at http://www.opensource.apple.com/darwinsource/10.5.4/apache_mod_php-44/php-5.2.5.tar.bz2 (Note that Apple has a directory tree for each Mac OS version.)

    The instruction “Now we’ll go to the source directory of the imap extension” needs to be spelled out:

    cd /SourceCache/php-5.2.5/ext/imap

    I’d recommend putting multi-line instructions on a single,unwrapped line in the browser, so that they can be reliably copied from the browser and pasted into the terminal window.

    After the configure, I did a make test and got all kinds of warnings and errors about signedness (for both Apple’s tarball and the php tarball). It does not seem that the instructions will work on Leopard Server. :-/

  3. 

    Hi Trevor,

    It’s not a requirement to unzip and compile c-client and php in the /SourceCache directory; you can do it safely from any directory.

    Good point about using the Apple php tarballs. The only reason I didn’t use them is because Apple hasn’t yet released one for PHP 5.2.6, so I went and grabbed it from php.net instead.

    I’ve updated the post to make the configure line clearer, thanks for the tip!

    And don’t let the “pointer targets in assignment differ in signedness” warnings in the php compile worry you; as long as it compiles completely it will work just fine ( these warnings are common ). I tested this under Leopard Server and Client without any problems.

  4. 

    Hi Trevor,

    It’s not a requirement to unzip and compile c-client and php in the /SourceCache directory; you can do it safely from any directory.

    Good point about using the Apple php tarballs. The only reason I didn’t use them is because Apple hasn’t yet released one for PHP 5.2.6, so I went and grabbed it from php.net instead.

    I’ve updated the post to make the configure line clearer, thanks for the tip!

    And don’t let the “pointer targets in assignment differ in signedness” warnings in the php compile worry you; as long as it compiles completely it will work just fine ( these warnings are common ). I tested this under Leopard Server and Client without any problems.

  5. 

    I’m with you all the way here, except that when I go to configure the imap module, I get:

    checking whether build with IMAP works… no
    configure: error: build test failed. Please check the config.log for details.

    config.log isn’t horribly helpful to mine eyes.

    it states:

    configure: failed program was:
    | /* confdefs.h. */

    and then, after some fairly generic defines and such, complains about:

    conftest.c:11:28: error: ac_nonexistent.h: No such file or directory

    Any ideas?

  6. 

    I’m with you all the way here, except that when I go to configure the imap module, I get:

    checking whether build with IMAP works… no
    configure: error: build test failed. Please check the config.log for details.

    config.log isn’t horribly helpful to mine eyes.

    it states:

    configure: failed program was:
    | /* confdefs.h. */

    and then, after some fairly generic defines and such, complains about:

    conftest.c:11:28: error: ac_nonexistent.h: No such file or directory

    Any ideas?

  7. 

    Not exactly sure what the problem would be, but I would make sure you have all of the OS X security updates installed ( the latest one updates PHP to 5.2.6 ) and also make sure the archive you downloaded is not corrupt.

  8. 

    Not exactly sure what the problem would be, but I would make sure you have all of the OS X security updates installed ( the latest one updates PHP to 5.2.6 ) and also make sure the archive you downloaded is not corrupt.

  9. 

    The configure option did not work for me…but the rest of the instructions did. I simply used this instead for the ./configure command:

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

    Then, after doing make install, I was actually able to copy the imap.so file from /usr/lib/php/extensions/no-debug-non-zts-20060613/imap.so to the extension directory for MAMP, and it actually worked. Note that I also followed these instructions (http://jaspan.com/openssl-support-php-under-mamp) to enable OpenSSL earlier (don’t know if that made a difference).

    (Small note- create /usr/local/include/ if it does not exist before beginning the instructions)

  10. 

    The configure option did not work for me…but the rest of the instructions did. I simply used this instead for the ./configure command:

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

    Then, after doing make install, I was actually able to copy the imap.so file from /usr/lib/php/extensions/no-debug-non-zts-20060613/imap.so to the extension directory for MAMP, and it actually worked. Note that I also followed these instructions (http://jaspan.com/openssl-support-php-under-mamp) to enable OpenSSL earlier (don’t know if that made a difference).

    (Small note- create /usr/local/include/ if it does not exist before beginning the instructions)

  11. 

    I’ve tried the above steps with no success. I even tried copying the imap.so into the apache2 extensions directory and adding it under the server monitor web piece which then caused apache to shutdown and I could not restart it. Any ideas as to what may be wrong? Thanks

  12. 

    I’ve tried the above steps with no success. I even tried copying the imap.so into the apache2 extensions directory and adding it under the server monitor web piece which then caused apache to shutdown and I could not restart it. Any ideas as to what may be wrong? Thanks

  13. 

    Finally got this working, thanks!

    I’m running OS X Server 10.5.5 on a G5 PowerMac. I fetched the PHP package from Apple. When I first tried to complie the programs with the “-arch ppc -arch ppc64″ (note that I have a non-intel processor) it always failed with the “checking whether build with IMAP works… no” error. Only after I removed the -arch ppc from the compile and configure commands it succeeded, I only used the -arch ppc64 option because that’s the only thing I needed.

    C-client was compiled with command:

    $ make oxp EXTRACFLAGS=”-arch ppc64 -g -Os -pipe -no-cpp-precomp”

    PHP IMAP module was configured with command:

    $ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=”-arch ppc64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch ppc64 -g -Os -pipe” CXXFLAGS=”-arch ppc64 -g -Os -pipe” LDFLAGS=”-arch ppc64 -bind_at_load” ./configure –with-kerberos=/usr –with-imap-ssl=/usr –with-imap=/usr

  14. 

    Finally got this working, thanks!

    I’m running OS X Server 10.5.5 on a G5 PowerMac. I fetched the PHP package from Apple. When I first tried to complie the programs with the “-arch ppc -arch ppc64″ (note that I have a non-intel processor) it always failed with the “checking whether build with IMAP works… no” error. Only after I removed the -arch ppc from the compile and configure commands it succeeded, I only used the -arch ppc64 option because that’s the only thing I needed.

    C-client was compiled with command:

    $ make oxp EXTRACFLAGS=”-arch ppc64 -g -Os -pipe -no-cpp-precomp”

    PHP IMAP module was configured with command:

    $ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=”-arch ppc64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch ppc64 -g -Os -pipe” CXXFLAGS=”-arch ppc64 -g -Os -pipe” LDFLAGS=”-arch ppc64 -bind_at_load” ./configure –with-kerberos=/usr –with-imap-ssl=/usr –with-imap=/usr

  15. 

    I couldn’t get this working.

    I kept getting permission denied errors when running configure.

    In the end I…

    1. Downloaded and unpacked Apple’s PHP 5.2.5 archive (as linked to by Trevor Jacques above)

    2. Followed the instructions here: http://de3.php.net/manual/en/install.pecl.phpize.php, which meant (on my Mac) I did:

    cd /SourceCache/php-5.2.5/ext/imap
    phpize
    ./configure –with-kerberos –with-imap-ssl
    make
    make test

    Got some crazy progress text, but seemed to work.

    3. Copied /SourceCache/php-5.2.5/ext/imap/modules/imap.so to /usr/lib/php/extensions/no-debug-non-zts-20060613 (the zts-xxxx may be different for you).

    4. Commented out extension_dir = “./” in /etc/php.ini (at around line 600) – NOTE: This website seems to replace quote marks with typographically ‘correct’ one, so be careful if cut and pasting that.

    5. Added extension=imap.so to /etc/php.ini (at around line 600)

    6. Started in-built apache server on Leopard by doing this in a Terminal:

    sudo apachectl start

    6. Ran a phpinfo() and imap showed up in the list.

    7. Then did a little login to a Gmail account (which requires IMAP SSL).

    It worked.

    Hope this helps.

    I’m no expert, so please be careful if you try the above.

  16. 

    I couldn’t get this working.

    I kept getting permission denied errors when running configure.

    In the end I…

    1. Downloaded and unpacked Apple’s PHP 5.2.5 archive (as linked to by Trevor Jacques above)

    2. Followed the instructions here: http://de3.php.net/manual/en/install.pecl.phpize.php, which meant (on my Mac) I did:

    cd /SourceCache/php-5.2.5/ext/imap
    phpize
    ./configure –with-kerberos –with-imap-ssl
    make
    make test

    Got some crazy progress text, but seemed to work.

    3. Copied /SourceCache/php-5.2.5/ext/imap/modules/imap.so to /usr/lib/php/extensions/no-debug-non-zts-20060613 (the zts-xxxx may be different for you).

    4. Commented out extension_dir = “./” in /etc/php.ini (at around line 600) – NOTE: This website seems to replace quote marks with typographically ‘correct’ one, so be careful if cut and pasting that.

    5. Added extension=imap.so to /etc/php.ini (at around line 600)

    6. Started in-built apache server on Leopard by doing this in a Terminal:

    sudo apachectl start

    6. Ran a phpinfo() and imap showed up in the list.

    7. Then did a little login to a Gmail account (which requires IMAP SSL).

    It worked.

    Hope this helps.

    I’m no expert, so please be careful if you try the above.

  17. 

    Thanks a lot, worked like a charm. I already had a lot of struggle to get other dynamic PHP-Extensions working; this one worked on the first try! Good work!!

  18. 

    Thanks a lot, worked like a charm. I already had a lot of struggle to get other dynamic PHP-Extensions working; this one worked on the first try! Good work!!

  19. 

    Hi,

    What is the source directory of the imap extension? I stop here.

    Thanks, from Brazil! =)

  20. 

    Hi,

    What is the source directory of the imap extension? I stop here.

    Thanks, from Brazil! =)

  21. 

    Hi,

    I found that I had to cd php-5.2.6/ext/imap before running phpize, otherwise I get the error “phpize Cannot find config.m4. Make sure that you run ‘/usr/bin/phpize’ in the top level source directory of the module”.

    I don’t know much about computers, but a google search suggests that you must be inside the source code directory before attempting phpize.

    Thanks for the great tutorial!

    Albert.

  22. 

    Hi,

    I found that I had to cd php-5.2.6/ext/imap before running phpize, otherwise I get the error “phpize Cannot find config.m4. Make sure that you run ‘/usr/bin/phpize’ in the top level source directory of the module”.

    I don’t know much about computers, but a google search suggests that you must be inside the source code directory before attempting phpize.

    Thanks for the great tutorial!

    Albert.

  23. 

    After upgrading to Snow Leopard i found that Imap stopped working as a newer version of php was installed (5.3). I followed the steps in the main article but as it would not compile with a ‘cc cannot create an executable’ error i changed

    MACOSX_DEPLOYMENT_TARGET=10.5
    CFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp”
    CCFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe”
    CXXFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe”
    LDFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load”
    ./configure –with-kerberos –with-imap-ssl

    to

    MACOSX_DEPLOYMENT_TARGET=10.6
    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”
    ./configure –with-kerberos –with-imap-ssl

    leaving out the power pc libs as Snow Leopard doesnt have them. Also check after the upgrade that you have renamed or backed up and renamed php.ini.default to php.ini with the extension=imap.so added and the extension_dir commented out.

  24. 

    After upgrading to Snow Leopard i found that Imap stopped working as a newer version of php was installed (5.3). I followed the steps in the main article but as it would not compile with a ‘cc cannot create an executable’ error i changed

    MACOSX_DEPLOYMENT_TARGET=10.5
    CFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp”
    CCFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe”
    CXXFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe”
    LDFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load”
    ./configure –with-kerberos –with-imap-ssl

    to

    MACOSX_DEPLOYMENT_TARGET=10.6
    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”
    ./configure –with-kerberos –with-imap-ssl

    leaving out the power pc libs as Snow Leopard doesnt have them. Also check after the upgrade that you have renamed or backed up and renamed php.ini.default to php.ini with the extension=imap.so added and the extension_dir commented out.

  25. 

    HI john / All

    I have MAC OS X 10.5.8 PPC 64 bit
    PHP version = 5.2.8

    i have follow below steps from this post.

    $ sudo mkdir -p /SourceCache
    $ cd /SourceCache
    $ curl -O ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
    $ tar -zxvf c-client.tar.Z
    $ cd imap-2007b
    $ make oxp EXTRACFLAGS=-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp
    $ sudo cp c-client/*.h /usr/local/include/
    $ sudo cp c-client/*.c /usr/local/lib
    $ sudo cp c-client/c-client.a /usr/local/lib/libc-client.a
    $ sudo curl -O http://www.opensource.apple.com/source/apache_mod_php/apache_mod_php-44.2/php-5.2.8.tar.bz2
    $ tar -xjvf php-5.2.8.tar.bz2
    $ cd /SourceCache/php-5.2.8/ext/imap
    $ phpize
    $ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=”-arch ppc64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch ppc64 -g -Os -pipe” CXXFLAGS=”-arch ppc64 -g -Os -pipe” LDFLAGS=”-arch ppc64 -bind_at_load” ./configure –with-kerberos=/usr –with-imap-ssl=/usr –with-imap=/usr
    $ make
    $ sudo make install
    $ sudo echo extension=imap.so >> /etc/php.ini
    $ cp /SourceCache/php-5.2.8/ext/imap/modules/imap.so /usr/lib/php/extensions/no-debug-non-zts-20060613
    $ sudo apachectl restart

    countinue in next post

  26. 

    HI john / All

    I have MAC OS X 10.5.8 PPC 64 bit
    PHP version = 5.2.8

    i have follow below steps from this post.

    $ sudo mkdir -p /SourceCache
    $ cd /SourceCache
    $ curl -O ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
    $ tar -zxvf c-client.tar.Z
    $ cd imap-2007b
    $ make oxp EXTRACFLAGS=-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp
    $ sudo cp c-client/*.h /usr/local/include/
    $ sudo cp c-client/*.c /usr/local/lib
    $ sudo cp c-client/c-client.a /usr/local/lib/libc-client.a
    $ sudo curl -O http://www.opensource.apple.com/source/apache_mod_php/apache_mod_php-44.2/php-5.2.8.tar.bz2
    $ tar -xjvf php-5.2.8.tar.bz2
    $ cd /SourceCache/php-5.2.8/ext/imap
    $ phpize
    $ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=”-arch ppc64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch ppc64 -g -Os -pipe” CXXFLAGS=”-arch ppc64 -g -Os -pipe” LDFLAGS=”-arch ppc64 -bind_at_load” ./configure –with-kerberos=/usr –with-imap-ssl=/usr –with-imap=/usr
    $ make
    $ sudo make install
    $ sudo echo extension=imap.so >> /etc/php.ini
    $ cp /SourceCache/php-5.2.8/ext/imap/modules/imap.so /usr/lib/php/extensions/no-debug-non-zts-20060613
    $ sudo apachectl restart

    countinue in next post

  27. 

    now my issue is while my check from command line, it’s gives warning as below. and imap extension not seems loaded.

    $ php -m
    PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/extensions/no-debug-non-zts-20060613/imap.so’ – (null) in Unknown on line 0
    [PHP Modules]
    ctype
    curl
    date
    dom
    exif
    filter
    ftp
    hash
    iconv
    json
    ………. output omitted…..
    zlib
    [Zend Modules]
    But i have check through info.php, it shows it loaded.
    i m much confused between this. it will be really apprentice if you can take me out of this.

    Thanks & Rg.
    Shailesh

  28. 

    now my issue is while my check from command line, it’s gives warning as below. and imap extension not seems loaded.

    $ php -m
    PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/extensions/no-debug-non-zts-20060613/imap.so’ – (null) in Unknown on line 0
    [PHP Modules]
    ctype
    curl
    date
    dom
    exif
    filter
    ftp
    hash
    iconv
    json
    ………. output omitted…..
    zlib
    [Zend Modules]
    But i have check through info.php, it shows it loaded.
    i m much confused between this. it will be really apprentice if you can take me out of this.

    Thanks & Rg.
    Shailesh

  29. 

    HI john / All

    I have MAC OS X 10.5.8 PPC 64 bit
    PHP version = 5.2.8

    i have follow below steps from this post.

    $ sudo mkdir -p /SourceCache
    $ cd /SourceCache
    $ curl -O ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
    $ tar -zxvf c-client.tar.Z
    $ cd imap-2007b
    $ make oxp EXTRACFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp”
    $ sudo cp c-client/*.h /usr/local/include/
    $ sudo cp c-client/*.c /usr/local/lib
    $ sudo cp c-client/c-client.a /usr/local/lib/libc-client.a
    $ sudo curl -O http://www.opensource.apple.com/source/apache_mod_php/apache_mod_php-44.2/php-5.2.8.tar.bz2
    $ tar -xjvf php-5.2.8.tar.bz2
    $ cd /SourceCache/php-5.2.8/ext/imap
    $ phpize
    $ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=”-arch ppc64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch ppc64 -g -Os -pipe” CXXFLAGS=”-arch ppc64 -g -Os -pipe” LDFLAGS=”-arch ppc64 -bind_at_load” ./configure –with-kerberos=/usr –with-imap-ssl=/usr –with-imap=/usr
    $ make
    $ sudo make install
    $ sudo echo “extension=imap.so” >> /etc/php.ini
    $ cp /SourceCache/php-5.2.8/ext/imap/modules/imap.so /usr/lib/php/extensions/no-debug-non-zts-20060613
    $ sudo apachectl restart

    now my issue is while my check from command line, it’s gives warning as below. and imap extension not seems loaded.

    $ php -m
    PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/extensions/no-debug-non-zts-20060613/imap.so’ – (null) in Unknown on line 0
    [PHP Modules]
    ctype
    curl
    date
    dom
    exif
    filter
    ftp
    hash
    iconv
    json
    ldap
    libxml
    mbstring
    mysql
    mysqli
    odbc
    openssl
    pcre
    PDO
    pdo_sqlite
    posix
    Reflection
    session
    SimpleXML
    sockets
    SPL
    SQLite
    standard
    tokenizer
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    zlib
    [Zend Modules]
    But i have check through info.php, it shows it loaded.
    i m much confused between this. it will be really apprentice if you can take me out of this.

    Thanks & Rg.
    Shailesh

  30. 

    HI john / All

    I have MAC OS X 10.5.8 PPC 64 bit
    PHP version = 5.2.8

    i have follow below steps from this post.

    $ sudo mkdir -p /SourceCache
    $ cd /SourceCache
    $ curl -O ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
    $ tar -zxvf c-client.tar.Z
    $ cd imap-2007b
    $ make oxp EXTRACFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp”
    $ sudo cp c-client/*.h /usr/local/include/
    $ sudo cp c-client/*.c /usr/local/lib
    $ sudo cp c-client/c-client.a /usr/local/lib/libc-client.a
    $ sudo curl -O http://www.opensource.apple.com/source/apache_mod_php/apache_mod_php-44.2/php-5.2.8.tar.bz2
    $ tar -xjvf php-5.2.8.tar.bz2
    $ cd /SourceCache/php-5.2.8/ext/imap
    $ phpize
    $ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=”-arch ppc64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch ppc64 -g -Os -pipe” CXXFLAGS=”-arch ppc64 -g -Os -pipe” LDFLAGS=”-arch ppc64 -bind_at_load” ./configure –with-kerberos=/usr –with-imap-ssl=/usr –with-imap=/usr
    $ make
    $ sudo make install
    $ sudo echo “extension=imap.so” >> /etc/php.ini
    $ cp /SourceCache/php-5.2.8/ext/imap/modules/imap.so /usr/lib/php/extensions/no-debug-non-zts-20060613
    $ sudo apachectl restart

    now my issue is while my check from command line, it’s gives warning as below. and imap extension not seems loaded.

    $ php -m
    PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/extensions/no-debug-non-zts-20060613/imap.so’ – (null) in Unknown on line 0
    [PHP Modules]
    ctype
    curl
    date
    dom
    exif
    filter
    ftp
    hash
    iconv
    json
    ldap
    libxml
    mbstring
    mysql
    mysqli
    odbc
    openssl
    pcre
    PDO
    pdo_sqlite
    posix
    Reflection
    session
    SimpleXML
    sockets
    SPL
    SQLite
    standard
    tokenizer
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    zlib
    [Zend Modules]
    But i have check through info.php, it shows it loaded.
    i m much confused between this. it will be really apprentice if you can take me out of this.

    Thanks & Rg.
    Shailesh

  31. 

    Will re-building PHP with the above flags remove my existing PHP extensions, like GD?

  32. 

    Will re-building PHP with the above flags remove my existing PHP extensions, like GD?

  33. 

    i running this on Lion server, until this step

    make oxp EXTRACFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp”it says -bash: make: command not found?Can anyone help?

  34. 

    I willing to pay for the service, if anyone can help me to enable PHP Imap extension on my Lion server, kindly contact me at jackwong@me.com thanks!

Trackbacks and Pingbacks:

  1. Sugar Developer Blog » Blog Archive » Enabling Xdebug under Mac OS X Leopard - November 25, 2008

    […] X Leopard, the pecl install xdebug command won’t work. The problem was earlier illustrated on this developer’s blog post, where the command line PHP version is built for 32-bit, while the […]

  2. Enabling Xdebug under Mac OS X Leopard | CRM Solution | CRM Software | Free CRM | Mobile CRM | Sugar CRM - February 6, 2009

    […] X Leopard, the pecl install xdebug command won’t work. The problem was earlier illustrated on this developer’s blog post, where the command line PHP version is built for 32-bit, while the […]

  3. Can Community Edition be installed on OS X Lion? - SugarCRM Forums - September 21, 2011

    […] […]

  4. FastStack MAMP Start, Restart Apache - November 9, 2012

    […] […]

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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