Composer 异常 [ErrorException]

2019-11-25 17:55 By "Powerless" 3595 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

  • PHP没你想的那么差
    Posted on 2021-12-17 15:40
  • 2016年云计算热词
    Posted on 2019-06-12 17:53
  • 快速了解Kafka
    Posted on 2021-03-25 14:20
  • 通过信鸽来解释HTTPS
    Posted on 2018-10-22 13:56
  • PHP7不兼容性
    Posted on 2018-03-07 15:59
  • 分布式架构之「 数据分布」
    Posted on 2019-11-14 10:00
  • PHP扩展ImageMagick安装
    Posted on 2022-11-11 11:16
  • Redis各种数据类型的使用场景举例分析【三】
    Posted on 2018-11-22 17:00