I am sure most of you already aware of the command but I have just learned about it recently, while I was playing with Ubuntu 14.04. After installing php modules, some are not enabled by default upon installation. One of those modules is php5-imap and php5-mcrypt is another one. You have to enable them with php5enmod command. As far as I can remember, this is not the way it used to work with Ubuntu 12.04.
php5enmod works just like the way a2enmod works for Apache.
php5enmod module-name # to enable php module php5enmod imap # to enable php5-imap php5enmod mcrypt # to enable php5-mcrypt
…or php5dismod, just like a2dismod works.
php5dismod module-name # to disable php module php5dismod imap # to disable php5-imap php5dismod mcrypt # to disable php5-mcrypt
You can always see the enabled php modules with…
php -m # for the entire list php -m | grep imap # to check for a certain module name
Do not forget that, even if you see the module name enabled on the “php -m” list, the module will not be active and working until you reload/restart apache. I am sure you know the difference between reload and restart; restart shuts the service down and then starts it up again, whereas reload instructs the daemon to reload its configuration.
service apache2 reload
Hope this helps someone…