2

I can't see mcrypt in phpinfo() in section "Additional .ini files parsed". 'php_mcrypt' have been installed. I use CentOs with nginx with PHP 5.3.3.

In /etc/php.d/mcrypt.ini I wrote extension=mcrypt.so.

I tried to change the extension path in php.ini (ex extension=/usr/lib64/php/modules/mcrypt.so), but it still doesn't work.

  • in your phpinfo(), what value do you have in the "Scan for additional .ini files" field? – Lorenzo Marcon Feb 06 '14 at 09:12
  • I see this path: /etc/php.d – Jacek Kiernicki Feb 06 '14 at 10:55
  • just stupid questions, but: 1) does the mcrypt.so file exists and is in the right path? 2) did you restart nginx after your changes to ini files? – Lorenzo Marcon Feb 06 '14 at 11:11
  • hehe, of course mcrypt.so file exists and I restarted nginx after every change :) – Jacek Kiernicki Feb 06 '14 at 11:19
  • someone else here in SO had a similar problem in CentOS, and he installed mcrypt from sources, maybe this could work for you as well? http://stackoverflow.com/a/20552188/636348 (remove yum version before) – Lorenzo Marcon Feb 06 '14 at 11:32
  • Resolved. Stupid thing. There was _; default extension directory. extension =mcrypt.so;_ in php.ini (no colon to the begining of this line). So I commented it in php.ini and changes /etc/php.d/mcrypt.ini to **extension=/usr/lib64/php/modules/mcrypt.so**. It works! Thank you @LorenzoMarcon :) – Jacek Kiernicki Feb 06 '14 at 11:33

1 Answers1

3

You are using Nginx, so i assume you are using php-fpm? If so you need to restart the php-fpm service in order to reload the plugins.

Restarting the nginx wont reload the php.ini

Maurizio In denmark
  • 4,226
  • 2
  • 30
  • 64