安装xxtea扩展提示“ERROR: failed to run `phpize’”的解决方法
今天给网站换服务器结果无法正常运行,一步步排查后发现是没有安装xxtea扩展导致加解密函数无法使用,于是就安装xxtea扩展
pecl install xxtea
【安装xxtea扩展提示“ERROR: failed to run `phpize’”的解决方法】结果提示一堆警告加一个错误提示
ERROR: failed to run 'phpize'
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to updateWarning: readlink() has been disabled for security reasons in OS/Guess.php on line 201
PHP Warning:readlink() has been disabled for security reasons in /usr/local/php/lib/php/OS/Guess.php on line 201Warning: popen() has been disabled for security reasons in OS/Guess.php on line 254
PHP Warning:popen() has been disabled for security reasons in /usr/local/php/lib/php/OS/Guess.php on line 254Warning: fgets() expects parameter 1 to be resource, null given in OS/Guess.php on line 255
PHP Warning:fgets() expects parameter 1 to be resource, null given in /usr/local/php/lib/php/OS/Guess.php on line 255Warning: pclose() expects parameter 1 to be resource, null given in OS/Guess.php on line 264
PHP Warning:pclose() expects parameter 1 to be resource, null given in /usr/local/php/lib/php/OS/Guess.php on line 264
downloading xxtea-1.0.11.tgz ...
Starting to download xxtea-1.0.11.tgz (7,404 bytes)
.....done: 7,404 bytes
4 source files, building
running: phpizeWarning: popen() has been disabled for security reasons in PEAR/Builder.php on line 525
PHP Warning:popen() has been disabled for security reasons in /usr/local/php/lib/php/PEAR/Builder.php on line 525
ERROR: failed to run `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_server
修改后:
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-fpm restart
再次安装xxtea扩展成功,重启php-fpm,网站正常运行!
推荐阅读
- Mac安装Chromedriver
- MongoDB,Wondows下免安装版|MongoDB,Wondows下免安装版 (简化版操作)
- MAC安装Mongo
- 【Hadoop踩雷】Mac下安装Hadoop3以及Java版本问题
- react|react 安装
- VueX--VUE核心插件
- Unity和Android通信系列文章2——扩展UnityPlayerActivity
- python-安装sublime遇到异常
- typeScript入门基础介绍
- 监控nginx