1

In CentOS I have a compiled version of PHP but it is missing IMAP module. Is it possible to add that module without re-compiling php?

1 Answer 1

1

Yes, you can just download the source of your current version, untar it, go the the ext/imap directory of the untared source then run:

phpize ./configure make 

You might need to run ./configure with some options specifiying the imap libraries used like:

 --with-imap=DIR Include IMAP support. DIR is the c-client install prefix ... --with-imap-ssl=DIR IMAP: Include SSL support. DIR is the OpenSSL install prefix 

After you compiled the module you should located it under ext/imap/modules, it should be named imap.so like ext/imap/modules/imap.so. You need to move this further to the extension_dir directory that you can get by running php -i | grep extension_dir or by createing a php file that will say <?php phpinfo(); ?> and run it from the web interface after which search for extension_dir on the result page.

After you've moved the module file you'll need to add a line in the php.ini file(or create an .ini file in the additional .ini files directory) that will say:

extension=imap.so 

After that you'll need to restart your web-server or php-fpm service in case you're using php-fpm.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.