Using imap functions in PHP without reinstalling and reinstalling

I wanted the latest version of PHP to work on the new Macbook, but installing php by default does not include imap functions. I need one specific function, namely the imap_rfc822_parse_headers function, but I don’t want to recompile, create and install PHP (not to mention the efforts required to install c-client and imap.so in advance) just for that, I’m afraid that convoluted procedures (each of which I found a little differently) can ruin my current installation, which is far from easy to configure.

Is there any other, easier way to install imap in PHP? In the corresponding note, is there an alternative to the function that I need?

+5
source share
1

- . : http://www.september28.co.uk/blog/2011/11/24/php-imap-support-in-mac-os-x-lion-without-recompiling-php/

- MacBook Pro 2011 MacOSX 10.7.4, PHP 5.4. : http://www.hirmet.com/mac-os-x-lion-upgrade-to-php-5-4

, :

imap URL-, , , "Z": ftp://ftp.cac.washington.edu/imap/

Unarchive, , :

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

, , , september28.

:

$ 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

, php, , ( ), imap.so . , PHP , .

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

:

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

... PHP , ( phpinfo();)

apache, .

$ sudo apachectl restart
+11

All Articles