I had the same issue and it was due to building PHP from source with ./configure --with-mcrypt option. It seems that if PHP is built with the --with-mcrypt flag, then there is no need to specify extension=mcrypt.so in php.ini. Doing so causes the warning mentioned above.