This applies to SUSE Linux
When I did "php -m" at the bash prompt, imap WAS listed as installed, however the results of <?php echo phpinfo(); ?> DID NOT have imap anywhere? All the *.ini files were processed from the \etc\php5\conf.d directory EXCEPT the imap.ini file.
I fixed this by adding to the file \etc\php5\apache2\php.ini the line:
... even though a file called imap.ini contained that same entry in \etc\php5\conf.d?
Explicitly entering the extension=imap.so in the php5.ini file fixed - you do have to restart PHP (reboot) after making the entry....
All is well now.