Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I installed a fresh Ubuntu 13.10 on my laptop. Like I usually do, I install the packages I need for Web development, which are nginx, php5-fpm, mysql, php5-mysql, php5-mcrypt and a few others.

After editing some configuration files, this usually works.

But today, since 13.10, an error appears instead of the Web page I expected.

Laravel requires the Mcrypt PHP extension. 

The package php5-mcrypt has been installed and reinstalled.

The command php -m doesn't seem to show mcrypt.

Any idea where the problem could come from? I've done this setup many times and it always worked.

share|improve this question

marked as duplicate by Eric Carvalho, Alvar, Lucio, karel, Eliah Kagan Jan 10 at 1:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
This is a bug report, ideally, and you should report the bug against php5-mcrypt with ubuntu-bug php5-mcrypt. –  Thomas W. Oct 18 '13 at 1:14
    
Thanks. I created a bug report. –  Marc-François Oct 18 '13 at 1:36
    
@Marc-François there is a typo in your edit to the accepted answer by Tom, instead of mods-avalaible it should be mods-available. –  karel Oct 18 '13 at 4:02
    
thx god, i thought im the only one having this issue..it drive me nuts... –  slier Oct 19 '13 at 16:17
    
This is a bug in php-mcrypt bugs.launchpad.net/ubuntu/+source/php-mcrypt/+bug/1240590 –  Braiam Oct 25 '13 at 10:49

2 Answers 2

up vote 37 down vote accepted

I had the same problem after I upgraded to 13.10 this evening. Apparently this is a genuine Ubuntu 13.10 bug: “phpmyadmin do not recognize php5-mcrypt”. The PHP modules got moved from the conf.d directory to the mods-available directory, and the mcrypt module got left behind.

To fix it I put a symlink to the mcrypt.ini file in the PHP config.

Apache

If you use Apache (rather than php-fpm):

sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/apache2/conf.d/20-mcrypt.ini
sudo service apache2 restart

php-fpm

Or for php-fpm (rather than Apache):

  1. Make symbolic link to ini files in mods-available

    sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/mcrypt.ini
    
  2. Enable mods

    sudo php5enmod mcrypt
    
  3. Restart FPM

    sudo service php5-fpm restart
    

share|improve this answer
    
Sorry, I do not use Apache. Your other solution for PHP-FPM didn't work. –  Marc-François Oct 18 '13 at 1:25
2  
You were almost right. bugs.launchpad.net/ubuntu/+source/php-mcrypt/+bug/1241286 –  Marc-François Oct 18 '13 at 3:30
    
oh my god thank you so much..i been trying for all solution i can found online but up to no avail..it drive me nuts..i almost give up..thx u –  slier Oct 19 '13 at 16:25
    
Wow... I had been fiddling with laravel for the past 2 days... just wow! Thank you Tom! Love the open source community –  Rixhers Ajazi Dec 15 '13 at 2:21
    
This doesn't seem to be required for 14.04 now. Still have to enable it though. –  CMCDragonkai Jun 10 at 9:53

Or, use:

sudo apt-get install php5-mcrypt

Im not sure of this will work on standard php installs - I installed php 5.5.7 using the package from:

sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.