問題解決
1.安裝apt-get install php5-mcrypt
2.編輯php配置文件vim /etc/php5/cgi/php.ini找到mcrypt並在下面添加紅色行:
[mcrypt]
; For more information about mcrypt settings see http://php.net/mcrypt-module-open
; Directory where to load mcrypt algorithms
; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
;mcrypt.algorithms_dir=
mcrypt.algorithms_dir=/etc/bash_completion.d/mcrypt
3.添加完成後注意要重啟fast-cgi:
root@Ubuntu:/# killall -9 php-cgi
root@Ubuntu:/# /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -C 20 -u nginx -g nginx -f /usr/bin/php5-cgi
作者“小白愛菜鳥”