Composer 异常 [ErrorException]

2019-11-25 17:55 By "Powerless" 3530 1 1

    近日在服务器上使用Composer安装第三方扩展发生异常:

[root@wzxaini9 /]# composer update

  [ErrorException]
  proc_get_status() has been disabled for security reasons


PHP Fatal error:  Uncaught ErrorException: proc_get_status() has been disabled for security reasons in phar:///usr/local/bin/composer/vendor/symfony/process/Process.php:1279

    经查,原因是在PHP升级后未开启proc_get_status扩展。

    进入php.ini文件找到 disable_functions 这一段,从中删除 proc_get_status后保存退出

[root@wzxaini9 /]# vim /usr/local/php/etc/php.ini
......
; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names.
; http://php.net/disable-functions
disable_functions = passthru,exec,system,chroot,chgrp,chown,shell_exec,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server
......

    接下来重启一下PHP服务就可以了


评 论

View in WeChat

Others Discussion

  • 分布式服务限流
    Posted on 2020-02-07 18:57
  • 有状态服务VS无状态服务
    Posted on 2020-02-07 18:18
  • 企业级PAAS云平台几个关键问题和挑战
    Posted on 2019-06-12 18:33
  • MySQL 单库后期分库策略
    Posted on 2019-08-19 14:31
  • Redis七大经典问题
    Posted on 2021-05-27 11:14
  • 关于HTTPS的五大误区
    Posted on 2020-02-02 01:10
  • 为什么要测量尾部延迟
    Posted on 2020-09-18 10:34
  • Git五分钟教程
    Posted on 2019-11-18 22:24