Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A web app I'm trying to install on my ubuntu 10.04 LTS requires mcrypt, and is generating this error: Fatal error: Call to undefined function mcrypt_module_open(). I know this is the same question as this one: Installed php-mcrypt but it doesn't show up in phpinfo(), but I tried several things, none of which worked, and have additional questions. I would comment on the original thread but don't have enough reputation to do so; forgive me for the duplicate question.

My versions of php and mcrypt are (both installed via apt-get):

php: 5.3.2-1ubuntu4.10
mcrypt: 5.3.2-0ubuntu

Doing a php -m shows that the mcrypt module is installed. I installed mcrypt and php5-mcrypt via apt-get.

Also, I'm using nginx as my web server. I have tried reinstalling mcrypt and restarting nginx, but still can't get mcrypt to show up on phpinfo() and calls to mcrypt are still broken.

Here is some more info:

$ php -i | grep "mcrypt"
mcrypt support => enabled
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value

I also checked that mcrypt is on in /etc/php5/cli/conf.d/mcrypt.ini and /etc/php5/cgi/conf.d/mcrypt.ini.

Lastly, I'm using fastCGI with nginx. I googled around and saw suggestions to restart php5-fpm. I couldn't find php5-fpm in apt-get, I'm not sure if I still need php5-fpm since I already have fastCGI.

Is there anything else I'm missing?

share|improve this question
Just reboot your machine. – symcbean Dec 1 '11 at 9:02
Why on earth would he reboot his machine? He just has to restart the PHP process... (not nginx) – Martin Fjordvald Dec 1 '11 at 16:16
Rebooting the machine actually worked. How could I have restarted the PHP processes without rebooting? – jules Dec 3 '11 at 7:02
Nevermind my question, nginx has a script here to start and stop fastCgi: – jules Dec 4 '11 at 7:08

PHP-FPM is the fastcgi process manager (or something like that); it is a common way of keeping PHP processes alive while nginx restarts.

From the command line, ps aux will show you what's running; if this is a private / testing server, sudo kill <process id> on anything that has PHP in the name until all the old processes are dead (or as commented above, reboot the whole box); if it's a public / live server you may not want to be so reckless...

Also, /etc/php5/cli/conf.d/mcrypt.ini -- what about /etc/php/cgi/... if that exists?

share|improve this answer
/etc/php/cgi/... doesn't exist, actually. Does this mean I'm missing something? When I do ps aux, I see 15+ instances of /usr/bin/php-cgi -b run by nginx. Is it safe to kill all of these? – jules Dec 1 '11 at 17:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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