1

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" /etc/php5/cli/conf.d/mcrypt.ini, 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?

4
  • Just reboot your machine. Commented Dec 1, 2011 at 9:02
  • 1
    Why on earth would he reboot his machine? He just has to restart the PHP process... (not nginx) Commented Dec 1, 2011 at 16:16
  • Rebooting the machine actually worked. How could I have restarted the PHP processes without rebooting? Commented Dec 3, 2011 at 7:02
  • Nevermind my question, nginx has a script here to start and stop fastCgi: wiki.nginx.org/PHPFcgiExample Commented Dec 4, 2011 at 7:08

1 Answer 1

1

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?

1
  • /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 127.0.0.1:9000 run by nginx. Is it safe to kill all of these? Commented Dec 1, 2011 at 17:28

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.