There is a weird problem with a default Ubuntu 14.04 LTS server installation. For some reason, php-mcrypt couldn’t run when running under FCGI mode using spawn-fcgi. It was correctly installed and configure but it is not detected correctly even under phpinfo();
However, everything seems to be work right after switching over to php-fpm instead of fcgi mode. I don’t know why.