Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
最近我从 Xubuntu 12 更新到 14.04。编程一段时间后,我需要使用 mcrypt 函数来帮助生成盐。令我沮丧的是,曾经有效的相同脚本不再有效
$salt = base64_encode(mcrypt_create_iv(24, MCRYPT_DEV_URANDOM));
现在会破坏我的脚本。
经过繁琐的搜索,我找到了答案。
mv -i /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/ sudo php5enmod mcrypt sudo service apache2 restart
现在 - 我只需要启用脚本,因为 mcrypt.ini 已经在 mods-available 中,但我将保留该部分,因为它可能对其他人有帮助。
来源: http: //www.devraju.com/about-me/ubuntu-13-1014-04-mcrypt-missing-fatal-error-undefined-function-mcrypt_encrypt/#comment-839735