使用composer提示[ErrorException ]proc_get_status() has been disabled for security reasons 的解决方法

composer提示[ErrorException]proc_get_status() has been disabled for security reasons的解决方法

从错误提示信息中可以看到是因为关闭了PHP的proc_get_status()函数,那么如何解决这个问题呢?

打开php.ini文件,搜索 disable_functions,找到如下类似内容:

disable_functions=passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_get_status,proc_open,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server
找到proc_get_status并删除然后重启php服务。

解决上面的提示后继续使用composer又出现了新的错误提示:[Symfony\Component\Process\Exception\RuntimeException] The Process class relies on proc_open,如图:

:[Symfony\Component\Process\Exception\RuntimeException] The Process class relies on proc_open

这个是缺少了PHP的proc_open函数,解决方法同样是打开php.ini文件搜索disable_functions,删除disable_functions=passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server中的proc_open并重启php服务。

然后使用composer就正常了,上面两个问题可以看出用composer来安装drupal8模块需开启proc_open和proc_open这两个PHP函数。

  • 4
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值