当前位置:首页 > Liunx教程 >

proc_get_status() has been disabled for security reasons

发布时间:2020-03-31 11:41:36 作者:佚名 阅读:(31)

今天在使用composer安装一个Laravel项目的扩展的时候,提示:proc_get_status() has been disabled for security reasons,接下来吾爱编程为大家介绍一下解决方法,有需要的小伙伴可以参考一下:

1、错误提示:

[[email protected] wizard]# composer install --prefer-dist --ignore-platform-reqs

                                                            
  [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
Stack trace:
#0 [internal function]: Composer\Util\ErrorHandler::handle(2, 'proc_get_status...', 'phar:///usr/loc...', 1279, Array)
#1 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(1279): proc_get_status(Resource id #324)
#2 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(700): Symfony\Component\Process\Process->updateStatus(false)
#3 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(752): Symfony\Component\Process\Process->isRunning()
#4 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(167): Symfony\Component\Process\Process->stop(0)
#5 [internal function]: Symfony\Component\Process\Process->__destruct()
#6 {main}
  thrown in phar:///usr/local/bin/composer/vendor/symfony/process/Process.php on line 1279

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
Stack trace:
#0 [internal function]: Composer\Util\ErrorHandler::handle(2, 'proc_get_status...', 'phar:///usr/loc...', 1279, Array)
#1 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(1279): proc_get_status(Resource id #324)
#2 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(700): Symfony\Component\Process\Process->updateStatus(false)
#3 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(752): Symfony\Component\Process\Process->isRunning()
#4 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(167): Symfony\Component\Process\Process->stop(0)
#5 [internal function]: Symfony\Component\Process\Process->__destruct()
#6 {main}
  thrown in phar:///usr/local/bin/composer/vendor/symfony/process/Process.php on line 1279

2、错误原因:

    默认安装的PHP一些函数是没有默认开启的,我们需要的函数是proc_get_status

3、解决方法:

vim /usr/local/php/etc/php.ini

    找到“disable_functions”,对应的时候是没有开启的一些函数,找到我们需要的“proc_get_status”,删掉,然后重启php的服务

service php-fpm restart


以上就是吾爱编程为大家介绍的关于proc_get_status() has been disabled for security reasons的解决方法,了解更多相关文章请关注吾爱编程网!

欢迎分享转载→ proc_get_status() has been disabled for security reasons

© 2015-2019 - 吾爱编程网 版权所有 苏ICP备18033726号-1关于我们 - 网站声明 - 联系我们