I've installed Laravel on a fresh install of Xubuntu 14.04. Mcrypt is installed and functioning as far as I can tell, but Laravel still reports that it cannot find it.
Testing Mcrypt
I have all the right packages installed and the module appears to have been enabled, I determined this by doing some basic diagnostic checks.
Mcrypt is in the list of installed php modules when I run:
php -m
I get "Loaded" from the terminal when I run:
php -r 'echo PHP_EOL . (extension_loaded("mcrypt") ? "loaded" : "not loaded") . PHP_EOL . PHP_EOL;'
This is the output of php -i | grep mcrypt
:
/etc/php5/cli/conf.d/20-mcrypt.ini,
Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.*
mcrypt
mcrypt support => enabled
mcrypt_filter support => enabled
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value
PWD => /var/www/html/mcrypttest
_SERVER["PWD"] => /var/www/html/mcrypttest
Installing Laravel
I used a fresh installation of Laravel to test this on, by running:
git clone https://github.com/laravel/laravel mcrypttest
cd mcrypttest/
composer install
Can anyone suggest how to diagnose why Laravel cannto access mcrypt?