Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8149769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:55:03+00:00 2026-06-06T14:55:03+00:00

I wanted the latest PHP version to work with on a fresh Macbook, but

  • 0

I wanted the latest PHP version to work with on a fresh Macbook, but the php installation does not include imap functions by default. There is one specific function I need – namely the “imap_rfc822_parse_headers” function, but I don’t feel like recompiling, building and installing PHP (not to mention the effort it takes to install c-client and imap.so beforehand) just for that. I fear that the convoluted procedures (of which each that I’ve found is somewhat different) might mess up my current installation which was by no means easy to set up.

Is there any other, easier way of installing imap into PHP? On a related note, is there perhaps a class-based alternative to the function I need?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:55:04+00:00Added an answer on June 6, 2026 at 2:55 pm

    I’ve finally found the solution. Most of it was here:
    http://www.september28.co.uk/blog/2011/11/24/php-imap-support-in-mac-os-x-lion-without-recompiling-php/

    My machine is a late 2011 Macbook Pro with MacOSX 10.7.4, PHP 5.4. installed via these instructions: http://www.hirmet.com/mac-os-x-lion-upgrade-to-php-5-4

    Here’s a step-by-step for those with a similar or identical setup:

    Download the imap source from this url, focus on the one with the most recent date which doesn’t end in “Z”: ftp://ftp.cac.washington.edu/imap/

    Unarchive, go into folder, run the following commands:

    $ make osx EXTRACFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp"
    

    The above command will throw a bunch of warnings at you, but should complete sucessfully, unlike the command originally suggested in the september28 blog post.

    Next, do the following:

    $ 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
    

    Once this is done, go into the downloaded php source folder if you made a custom upgrade like I did (as per the second link in the answer) and build the imap.so extension for your system. If you didn’t build a custom version, just download the PHP source for the version you have installed, and use that, it doesn’t matter.

    $ cd ~/Downloads/Php-5.4.4/ext/imap
    $ phpize
    $ ./configure --with-imap==/usr/local/imap-2007 --with-kerberos --with-imap-ssl
    $ make
    

    Once done, do the following:

    $ sudo cp modules/imap.so /usr/lib/php/extensions/no-debug-non-zts-20100525/
    

    …or if your PHP extension folder is different, put that (you can see the location in phpinfo(); )

    Restart apache and you should be ready to go.

    $ sudo apachectl restart
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

...just wanted to confirm that since the latest soundcloud api does not provide a
Latest version of Sqlite (3.7.10) wanted to link __msize function and since Delphi memory
First I wanted to upgrade my git installation and tried it using the latest
I wanted to do Fizzbuzz in php by using unary if, but the output
Actually i wanted to update my existing Ghostscript from version 9.02 to 9.05 latest
I wanted to grab the latest changes to SVN without overwriting local changes... but
My latest released program is version 2.0.1.0, but since it's just in beta I
Details: Tortoisesvn client (latest version) Windows Vista. Yesterday I wanted to add an external
Here is the latest code. I wanted to try something different but I am
I wanted to use 6 different textures on a cube, one per side, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.