PHP Fatal error: Call to undefined function mcrypt_get_iv_size()

I got a problem on my site today, suddenly it doesn’t work when i updated via git.
in my error log there is :

FastCGI sent in stderr: "PHP message: PHP Fatal error: Call to undefined function mcrypt_get_iv_size() ......

and so i try to install the mcrypt library

apt-get install php5-mcrypt

and then restart my nginx

service nginx restart

but sadly my site still not working, and the error still remain.
and when i see the result from
php -i
there is no mcrypt displayed which is mean that the mcrypt is not loaded yet.

then i run

php5enmod mcrypt

and there is lines in phpinfo that said that mcypt is enabled. and once again i restart the nginx

service nginx restart

but once again the site still not working and the undefined function mcrypt_get_iv_size() still remain.

after searching around, it seems there are some people having trouble like mine.
so the solution for my problem is quite simple (although searching for it take me quite sometime :D).
so what i need to do is restart the php5-fpm service

service php5-fpm restart

and restart my nginx

service nginx restart

and there it is, my web running well again 😀

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s