今天给网站换了服务器,无法正常运行。一步步排查,发现加解密功能无法使用是因为没有安装xxtea扩展,于是安装了xxtea扩展peclinstallxxtea结果提示了一堆警告和错误信息错误:无法运行'phpize'警告:通道“pecl.php.net”已更新其协议,请使用“peclchannel-updatepecl.php.net”进行更新警告:出于安全原因,readlink()在OS/Guess.phponline201PHPWarning:readlink()hasbeendisabledforsecurityreasonsin/usr/local/php/lib/php/OS/Guess.phponline201Warning:popen()hasbeendisabledforsecurityreasonsinOS/Guess.phponline254PHPWarning:popen()hasbeendisabledforsecurityreasonsin/usr/local/php/lib/php/OS/Guess.phponline254Warning:fgets()expectsparameter1toberesource,给定为空在OS/Guess.php中的第255PHP行警告:fgets()期望参数1为资源,在/usr/local/php/lib/php/OS/Guess.php中给出nullonline255Warning:pclose()expectsparameter1toberesource,nullgiveninOS/Guess.phponline264PHPWarning:pclose()expectspa参数1为资源,在第264行的/usr/local/php/lib/php/OS/Guess.php中给出了null下载xxtea-1.0.11.tgz...开始下载xxtea-1.0.11.tgz(7,404字节)...完成:7,404字节4源文件,构建运行:phpizeWarning:出于安全原因,第525行的PEAR/Builder.php中出于安全原因禁用了popen()PHP警告:出于安全原因,在/usr中禁用了popen()/local/php/lib/php/PEAR/Builder.phponline525ERROR:failedtorun`phpize'于是开始疯狂百度,百度给出的结果大概意思是php.ini中popen功能被禁用了,只有你需要从php.ini中的disable_functions的值中删除popen最初:disable_functions=passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,`popen`,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_servermodified:disable_functions=passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter、ini_restore、dl、openlog、syslog、readlink、symlink、popepassthru、stream_socket_server并重启php-fpm/etc/init.d/php-fpmrestart再次成功安装xxtea扩展,重启php-fpm,网站运行正常!
